/usr/share/doc/git-dpm/manpage.html is in git-dpm 0.8.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 | <!-- Creator : groff version 1.21 -->
<!-- CreationDate: Mon Dec 12 14:34:08 2011 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>GIT-DPM</title>
</head>
<body>
<h1 align="center">GIT-DPM</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#SHORT EXPLANATION OF THE BRANCHES">SHORT EXPLANATION OF THE BRANCHES</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#GLOBAL OPTIONS">GLOBAL OPTIONS</a><br>
<a href="#COMMANDS">COMMANDS</a><br>
<a href="#the debian/.git−dpm file">the debian/.git−dpm file</a><br>
<a href="#SHORTCUTS">SHORTCUTS</a><br>
<a href="#BRANCHES">BRANCHES</a><br>
<a href="#COPYRIGHT">COPYRIGHT</a><br>
<a href="#REPORTING BUGS AND ISSUES">REPORTING BUGS AND ISSUES</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">git−dpm
− debian packages in git manager</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>git−dpm
−−help</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>git−dpm</b>
[ <i>options</i> ] <i>command</i> [
<i>per−command−options and −arguments</i>
]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Git−dpm
is a tool to handle a debian source package in a git
repository.</p>
<p style="margin-left:11%; margin-top: 1em">Each project
contains three branches, a debian branch
(<b>master</b>/<i>whatever</i>), a patched branch
(<b>patched</b>/<b>patched−</b><i>whatever</i>) and an
upstream branch
(<b>upstream</b>/<b>upstream−</b><i>whatever</i>) and
<b>git−dpm</b> helps you store the information in
there so you have your changes exportable as quilt
series.</p>
<p style="margin-left:11%; margin-top: 1em">Git−dpm
will guess the other two branches based on the branch it
sees. (Most commands act based on the current HEAD, i.e.
what branch you have currently checked out, though some as
e.g. <b>status</b> allows an optional argument instead). So
for example, if you are in branch <b>master</b>,
git−dpm assumes the corresponding upstream branch is
called <b>upstream</b>. If you are in branch
<b>upstream−something</b>, it assumes the debian
branch is called <b>something</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Note that most
commands may switch to another branch automatically, partly
because it is easier to implement that way and hopefully so
one does not need to switch branches manually so often.</p>
<h2>SHORT EXPLANATION OF THE BRANCHES
<a name="SHORT EXPLANATION OF THE BRANCHES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">the upstream
branch
(<b>upstream</b>|<b>upstream−</b><i>whatever</i>)</p>
<p style="margin-left:22%;">This branch contains the
upstream sources. It contents need to be equal enough to the
contents in your upstream tarball.</p>
<p style="margin-left:11%;">the patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>)</p>
<p style="margin-left:22%;">This branch contains your
patches to the upstream source. Every commit will be stored
as a single patch in the resulting package.</p>
<p style="margin-left:22%; margin-top: 1em">Most of the
time it will not exist as branch known to <b>git</b>, but
only as some point in the history of the debian branch and
possibly as tag for published versions. <b>Git−dpm</b>
will create it when needed and remove the branch when no
longer needed.</p>
<p style="margin-left:22%; margin-top: 1em">To help git
generate a linear patch series, this should ideal be a
linear chain of commits, whose description are helpful for
other people.</p>
<p style="margin-left:22%; margin-top: 1em">As this branch
is regulary rebased, you should not publish it.</p>
<p style="margin-left:11%;">the debian branch
(<b>master</b>|<i>whatever</i><b>)</b></p>
<p style="margin-left:22%;">This is the primary branch.</p>
<p style="margin-left:22%; margin-top: 1em">This branch
contains the <b>debian/</b> directory and has the patched
branch merged in.</p>
<p style="margin-left:22%; margin-top: 1em">Every change
not in <b>debian/</b>, <b>.git</b><i>*</i> or deleting files
must be done in the patched branch.</p>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Let’s
start with some examples: <br>
Checking out a project</p>
<p style="margin-left:22%;">First get the master branch:
<b><br>
git clone</b> <i>URL</i></p>
<p style="margin-left:22%; margin-top: 1em">Then create
upstream branch and see if the .orig.tar is ready: <b><br>
git−dpm prepare</b></p>
<p style="margin-left:22%; margin-top: 1em">Create the
patched branch and check it out: <b><br>
git−dpm checkout−patched</b></p>
<p style="margin-left:22%; margin-top: 1em">Do some
changes, apply some patches, commit them.. <i><br>
...</i> <b><br>
git commit</b></p>
<p style="margin-left:22%; margin-top: 1em">If your
modification fixes a previous change (and that is not the
last commit, otherwise you could have used
−−amend), you might want to squash those two
commits into one, so use: <b><br>
git rebase −i upstream</b></p>
<p style="margin-left:22%; margin-top: 1em">Then you want
to get those changes into the debian branch and the new
patch files created (which you can do using <b>git−dpm
update−patches</b>), but you most likely want to also
document what you did in the changelog, so all in one step:
<b><br>
git−dpm dch −i</b></p>
<p style="margin-left:22%; margin-top: 1em">Perhaps change
something in the debian packaging: <i><br>
...</i> <b><br>
git commit −a</b></p>
<p style="margin-left:22%; margin-top: 1em">Then push the
whole thing back: <b><br>
git push</b></p>
<p style="margin-left:11%;">Switching to a new upstream
version</p>
<p style="margin-left:22%;">Get a new .orig.tar file.
Either upgrade your upstream branch to the contents of that
file and call <b>git−dpm new−upstream
../</b><i>new−stuff</i><b>.orig.tar.gz</b> or tell
git−dpm to import and record it: <b><br>
git−dpm import−new−upstream
−−rebase
../</b><i>new−stuff</i><b>.orig.tar.gz</b></p>
<p style="margin-left:22%; margin-top: 1em">This will
rebase the patched branch to the new upstream branch,
perhaps you will need to resolve some conflicts: <i><br>
vim ...</i> <b><br>
git add</b> <i>resolved files</i> <b><br>
git rebase −−continue</b></p>
<p style="margin-left:22%; margin-top: 1em">After rebase is
run (with some luck even in the first try): <b><br>
git−dpm dch −− −v</b>
<i>newupstream</i><b>−1 "new upstream
version"</b></p>
<p style="margin-left:22%; margin-top: 1em">You could have
also done the last step in three by: <b><br>
git−dpm update−patches <br>
dch −v</b> <i>newupstream</i><b>−1 "new
upstream version" <br>
git commit −−amend −a</b></p>
<p style="margin-left:22%; margin-top: 1em">Do other
debian/ changes: <i><br>
...</i> <b><br>
git commit −a</b></p>
<p style="margin-left:22%; margin-top: 1em">Then push the
whole thing back: <b><br>
git push</b></p>
<p style="margin-left:11%;">Creating a new project</p>
<p style="margin-left:22%;">Create an <b>upstream</b> (or
<b>upstream−</b><i>whatever</i>) branch containing the
contents of your orig.tar file: <b><br>
tar −xvf</b>
<i>example</i><b>_</b><i>0</i><b>.orig.tar.gz <br>
cd</b> <i>example</i><b>−</b><i>0</i> <b><br>
git init <br>
git add . <br>
git commit −m "import</b>
<i>example</i><b>_</b><i>0</i><b>.orig.tar.gz" <br>
git checkout −b upstream−unstable</b></p>
<p style="margin-left:22%; margin-top: 1em">You might want
to use pristine tar to store your tar: <b><br>
pristine−tar commit
../</b><i>example</i><b>_</b><i>0</i><b>.orig.tar.gz
upstream−unstable</b></p>
<p style="margin-left:22%; margin-top: 1em">Then let
git−dpm know what tarball your upstream branch belongs
to: <b><br>
git−dpm init
../</b><i>example</i><b>_</b><i>0</i><b>.orig.tar.gz</b></p>
<p style="margin-left:22%; margin-top: 1em">Note that since
you were in <b>upstream−unstable</b> in this example,
in the last example <b>git−dpm</b> assumed you want
your debian branch called <b>unstable</b> and not
<b>master</b>, so after the command returned you are in the
newly created <b>unstable</b> branch.</p>
<p style="margin-left:22%; margin-top: 1em">Do the rest of
the packaging: <i><br>
vim</i> <b>debian/control debian/rules <br>
dch −−create −−package</b>
<i>example</i> <b>−v</b> <i>0</i><b>−1 <br>
git add debian/control debian/rules debian/changelog <br>
git commit −m "initial packaging"</b></p>
<p style="margin-left:22%; margin-top: 1em">Then add some
patches: <b><br>
git−dpm checkout−patched</b> <i><br>
vim ...</i> <b><br>
git commit −a <br>
git−dpm dch "</b><i>fix ... (Closes:
num)</i><b>"</b></p>
<p style="margin-left:22%; margin-top: 1em">The
<b>git−dpm checkout−patched</b> created a
temporary branch <b>patched−unstable</b> (as you were
in a branch called <b>unstable</b>. If you had called it
with HEAD being a branch <b>master</b>, it would have been
<b>patched</b>) to which you added commits. Then the
<b>git−dpm update−patches</b> implied by
<b>git−dpm dch</b> merged those changes into
<b>unstable</b>, deleted the temporary branch and created
new <b>debian/patches/</b> files.</p>
<p style="margin-left:22%; margin-top: 1em">Then build your
package: <b><br>
git−dpm status && <br>
dpkg−buildpackage −rfakeroot −us −uc
−I".git*"</b></p>
<p style="margin-left:22%; margin-top: 1em">Now take a look
what happened, perhaps you want to add some files to
<b>.gitignore</b> (in the <b>unstable</b> branch), or remove
some files from the <b>unstable</b> branch becaus your clean
rule removes them.</p>
<p style="margin-left:22%; margin-top: 1em">Continue the
last few steps until the package is finished. Then push your
package: <b><br>
git−dpm tag <br>
git push −−tags</b> <i>target</i>
<b>unstable:unstable
pristine−tar:pristine−tar</b></p>
<h2>GLOBAL OPTIONS
<a name="GLOBAL OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>−−debug</b></p>
<p style="margin-left:22%;">Give verbose output what
git−dpm is doing. Mostly only useful for debugging or
when preparing an bug report.</p>
<p style="margin-left:11%;"><b>−−debug−git−calls</b></p>
<p style="margin-left:22%;">Output git invocations to
stderr. (For more complicated debugging cases).</p>
<p style="margin-left:11%;"><b>−−allow−changes−in−debian−branch</b></p>
<p style="margin-left:22%;">Ignore upstream changes in your
debian branch. This will either discard them if
merge−patched is called by come command or them being
ignored elsewhere.</p>
<h2>COMMANDS
<a name="COMMANDS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>init</b>
[<i>options</i>] <i>tarfile</i> [<i>upstream-commit</i>
[<i>preapplied-commit</i> <br>
[<i>patched-commit</i>]]]</p>
<p style="margin-left:22%;">Create a new project.</p>
<p style="margin-left:22%; margin-top: 1em">The first
argument is an upstream tarball.</p>
<p style="margin-left:22%; margin-top: 1em">You also need
to have the contents of that file and the files given with
−−component unpackaged as some branch or commit
in your git repository (or similar enough so
<b>dpkg−source</b> will not know the difference). This
will be stored in the upstream branch (called
<b>upstream</b> or <b>upstream−</b><i>whatever</i>).
If the second argument is non-existing or empty, that branch
must already exist, otherwise that branch will be
initialized with what that second argument. (It’s your
responsiblity that the contents match. git−dpm does
not know what your clean rule does, so cannot check (and
does not even try to warn yet)).</p>
<p style="margin-left:22%; margin-top: 1em">You can already
have an debian branch (called <b>master</b> or
<b>whatever</b>). If it does not exist, it will exist
afterwards. Otherwise it can contain a
<b>debian/patches/series</b> file, which git−dpm will
import.</p>
<p style="margin-left:22%; margin-top: 1em">The third
argument can be a descendant of your upstream branch, that
contains the changes of your debian branch before any
patches are applied (Most people prefer to have none and
lintian warns, but if you have some, commit/cherry pick them
in a new branch/detached head on top of your upstream branch
and name them here). Without
−−patches−applied, your debian branch may
not have any upstream changes compared to this commit (or if
it is not given, the upstream branch).</p>
<p style="margin-left:22%; margin-top: 1em">If there is no
fourth argument, git−dpm will apply possible patches
in your debian branch on top of the third argument or
upstream. You can also do so yourself and give that as
fourth argument.</p>
<p style="margin-left:22%; margin-top: 1em">The contents of
this commit/branch given in the fourth commit or created by
applying patches on top of the third/your upstream branch is
then merged into your debian branch and remembered as
patched branch.</p>
<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
−−component</b> <i>filename</i></p>
<p style="margin-left:32%;">Record a
<b>.orig−</b><i>component</i><b>.tar</b> file to be
unpacked in your upstream branch.</p>
<p style="margin-left:22%;"><b>−−patches−applied</b></p>
<p style="margin-left:32%;">Denote the debian branch
already has the patches applied.</p>
<p style="margin-left:32%; margin-top: 1em">Without this
git−dpm will check there are no changes in the debian
branch outside patch management before applying the patches
but instead check there are no differences after applying
the patches.</p>
<p style="margin-left:22%;"><b>−−create−no−patches</b></p>
<p style="margin-left:32%;">Do not create/override
<b>debian/patches</b> directory. You will have to call
<b>update−patches</b> yourself. Useful if you are
importing historical data and keep the original patches in
the debian branch.</p>
<p style="margin-left:22%;"><b>−−record−patch−category</b></p>
<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to each imported patch that is in a subdirectory of
<b>debian/patches</b>. This causes
<b>update−patches</b> to store it in the same
subdirectory.</p>
<p style="margin-left:22%;"><b>−−record−patch−name</b></p>
<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to each imported patch with its name. This causes
<b>update−patches</b> to store it under its original
name.</p>
<p style="margin-left:11%;"><b>prepare</b></p>
<p style="margin-left:22%;">Make sure upstream branch and
upstream orig.tar ball are there and up to date. (Best
called after a clone or a pull).</p>
<p style="margin-left:11%;"><b>status</b>
[<i>branch</i>]</p>
<p style="margin-left:22%; margin-top: 1em">Check the
status of the current project (or of the project belonging
to the argument <i>branch</i> if that is given). Returns
with non-zero exit code if something to do is detected.</p>
<p style="margin-left:11%;"><b>checkout−patched</b></p>
<p style="margin-left:22%; margin-top: 1em">Checkout the
patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>) after
making sure it exists and is one recorded in the
<b>debian/.git−dpm</b> file.</p>
<p style="margin-left:22%; margin-top: 1em">If the patched
branch references an old state (i.e. one that is already
ancestor of the current debian branch), it is changed to the
recorded current one.</p>
<p style="margin-left:22%; margin-top: 1em">Otherwise you
can reset it to the last recorded state with the
<b>−−force</b> option.</p>
<p style="margin-left:11%;"><b>update−patches</b>
[<i>options</i>] [<i>branch-name</i>]</p>
<p style="margin-left:22%; margin-top: 1em">After calling
<b>merge−patched−into−debian</b> if
necessary, update the contents of <b>debian/patches</b> to
the current state of the <b>patched</b> branch.</p>
<p style="margin-left:22%; margin-top: 1em">Also record in
debian/.git−dpm which state of the patched branch the
patches directory belongs to.</p>
<p style="margin-left:22%; margin-top: 1em">If a
<i>branch-name</i> is given, that branch is processed.
Otherwise the name is derived from the currently checked out
branch as usual.</p>
<p style="margin-left:22%; margin-top: 1em">Options:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">
<p><b>−−redo</b></p></td>
<td width="1%"></td>
<td width="68%">
<p>Do something, even if it seems like there is nothing to
do.</p> </td></tr>
</table>
<p style="margin-left:22%;"><b>−−allow−revert</b>,
<b>−−ignore−deletions</b>,
<b>−−dot−git−files=</b><i>*</i></p>
<p style="margin-left:32%;">passed on to
merge−patched−into−debian</p>
<p style="margin-left:22%;"><b>−−amend</b></p>
<p style="margin-left:32%;">Do not create a new commit, but
amend the last one in the debian branch. (I.e. call
merge−patched−into−debian with
−−amend and amend the updates patches into the
last commit even if that was not created by
merge−patched−into−debian).</p>
<p style="margin-left:22%;"><b>−m</b>
<i>message</i></p>
<p style="margin-left:32%;">Use <i>message</i> as commit
message. (If used together with −−amend, do not
reuse old commit message, author or author date but replace
the old commit with a new commit with that message).</p>
<p style="margin-left:22%;"><b>−−keep−branch</b></p>
<p style="margin-left:32%;">do not remove an existing
patched branch (usually that is removed and can be recreated
with <b>checkout−patched</b> to avoid stale copies
lurking around.</p>
<p style="margin-left:11%;"><b>dch</b> [<i>options</i>]
<b>−−</b> <i>dch-options</i></p>
<p style="margin-left:22%;">After calling
update−patches if necessary, run devscripts’ dch
with the specified options and then do a <b>git commit</b>
with a commit message containing changes to the
<b>debian/changelog</b> file.</p>
<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
−−amend</b></p>
<p style="margin-left:32%;">Replace the commit currently
the head of the debian branch
(<b>master</b>|<i>something</i>) instead of creating a new
one on top. The commit message will contain also include
changes done to <b>debian/changelog</b> in the previous
commit (unless reverted by the new edit).</p>
<p style="margin-left:22%;"><b>−−ignore−patches</b></p>
<p style="margin-left:32%;">Do not call
update−patches but simply ignore the current state of
the patched branch
(<b>patched</b>|<b>patched−</b><i>something</i>).</p>
<p style="margin-left:22%;"><b>−−keep−branch</b>,
<b>−−allow−revert</b>,
<b>−−allow−nonlinear</b>, <b><br>
−−ignore−deletions</b>,
<b>−−dot−git−files=</b><i>*</i></p>
<p style="margin-left:32%;">Passed to update−patches,
if called.</p>
<p style="margin-left:22%;"><b>−−latest−only</b>|<b>−−latest</b>|<b>−l</b></p>
<p style="margin-left:32%;">Only include changes between
the current working directory before calling dch and after
calling it (and not since the last commit or the last commit
not replaced).</p>
<p style="margin-left:22%;"><b>−e</b> |
<b>−v</b> | <b>−a</b> | <b>−−all</b>
| <b>−s</b> | <b>−n</b> |
<b>−−no−verify</b> | <b>−u</b> |
<b><br>
−−untracked−files</b> | <b>−q</b> |
<b>−−quiet</b> |
<b>−−cleanup=</b><i>...</i> |
<b>−−author=</b><i>...</i></p>
<p style="margin-left:32%;">passed to git commit.</p>
<p style="margin-left:11%;"><b>merge−patched−into−debian</b>
[<i>options</i>] [<i>branch-name</i>]</p>
<p style="margin-left:22%;">Usually
<b>update−patches</b> runs this for you if deemed
necessary.</p>
<p style="margin-left:22%; margin-top: 1em">This command is
the core of <b>git−dpm</b>, but you usually do not
call it directly. It is called by
<b>update−patches</b> and things calling
<b>update−patches</b> like <b>dch</b> when
necessary.</p>
<p style="margin-left:22%; margin-top: 1em">It replaces all
files (with only the exceptions described below) in the
current debian branch (<b>master</b>|<i>whatever</i>) with
those found in the patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>).</p>
<p style="margin-left:22%; margin-top: 1em">Only the
<b>debian</b> directory and files in the root directory
starting with ".git" are kept from the debian
branch (so <b>.gitignore</b>, <b>.gitattributes</b>, ...
will stay). And all files that were found in the last
recorded patched branch and deleted in the current debian
branch will also be deleted in the new one.</p>
<p style="margin-left:22%; margin-top: 1em">Additionally
the <b>debian/.git−dpm</b> file will be updated so the
current patched branch is recorded and is marked as
belonging to the last recorded upstream branch.</p>
<p style="margin-left:22%; margin-top: 1em">If there is no
<i>branch-name</i> given on the command line the base name
of the branches to operate on is computed from the currently
checked out branch as usual. Otherwise this argument is
used.</p>
<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
−−allow−revert</b></p>
<p style="margin-left:32%;">Usually reverting to an old
state of the patched branch is not allowed, to avoid
mistakes (like having only pulled the debian branch and
forgot to run <b>checkout−patched</b>). This option
changes that so you can for example drop the last patch in
your stack.</p>
<p style="margin-left:22%;"><b>−−no−ignore−deletions</b>
(default)</p>
<p style="margin-left:32%;">Files deleted currently in the
debian branch relative to the recorded patched branch will
still be deleted in the new debian branch and not taken from
the new patched branch. This is the default unless a
different default was set with <b><br>
git config dpm.</b><i>BRANCHNAME</i><b>.dpmIgnoreDeletions
true</b>.</p>
<p style="margin-left:22%;"><b>−−ignore−deletions</b></p>
<p style="margin-left:32%;">Disable the behaviour described
in <b>−−no−ignore−deletions</b>.</p>
<p style="margin-left:22%;"><b>−−dot−git−files=</b><i>method</i></p>
<p style="margin-left:32%;">Specify how files starting with
<b>.git</b> outside <b>debian/</b> are handled. Those are
handles specially as <b>.gitattributes</b> and
<b>.gitignore</b> might be different in the debian branch
without being part of any patch. (The whole <b>debian/</b>
directory is always taken from the debian branch, so files
there are not affected).</p>
<p style="margin-left:32%; margin-top: 1em">Possible
methods are: <b><br>
automatic</b> (default)</p>
<p style="margin-left:43%;">Any <b>.git</b><i>*</i> files
that are added, modified or removed in the current debian
branch compared to the old upstream branch are set to this
state, everything else is taken as found in the new patched
branch.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>debian</b></p></td>
<td width="1%"></td>
<td width="57%">
<p>All <b>.git</b><i>*</i> files are taken from the debian
branch. Files with a name like that from the patched branch
are ignored.</p></td></tr>
</table>
<p style="margin-left:32%;"><b>upstream</b></p>
<p style="margin-left:43%;">Files starting with <b>.git</b>
are not given special handling. They are taken from the
patched branch, unless they are deleted in the debian branch
and the default
<b>−−no−ignore−deletions</b> is
active. (i.e. just like any other file outside
<b>debian/</b>).</p>
<p style="margin-left:22%;"><b>−−keep−branch</b></p>
<p style="margin-left:32%;">do not remove an existing
patched branch (usually that is removed and can be recreated
with <b>checkout−patched</b> to avoid stale copies
lurking around).</p>
<p style="margin-left:22%;"><b>−−amend</b></p>
<p style="margin-left:32%;">Replace the last commit on your
debian branch (as git commit −−amend would do).
With the exception that every parent that is an ancestor of
or equal to the new patched branch or the recorded patched
branch is omitted. (That is, you lose not only the commit on
the debian branch, but also a previous state of the patched
branch if your last commit also merged the patched
branch).</p>
<p style="margin-left:22%;"><b>−m</b>
<i>message</i></p>
<p style="margin-left:32%;">Commit message to use for the
new commit created. (If used together with
−−amend, this disables reusing the old author
and date).</p>
<p style="margin-left:11%;"><b>import−new−upstream</b>
[<i>options</i>] <i>.orig.tar</i></p>
<p style="margin-left:22%;">Import the contents of the
given tarfile (as with <b>import−tar</b>) and record
this branch (as with <b>new−upstream</b>).</p>
<p style="margin-left:22%; margin-top: 1em">This is roughly
equivalent to: <b><br>
git−dpm import−tar −p</b> <i>upstream
filename</i> <b><br>
git checkout −b</b> <i>upstream</i> <b><br>
git−dpm new−upstream</b> <i>filename</i> <b><br>
−−detached</b></p>
<p style="margin-left:32%;">Don’t make the new
upstream branch an ancestor of the old upstream branch
(unless you readd that with <b>−p</b>).</p>
<p style="margin-left:22%;"><b>−p</b>
<i>commit-id</i>|<b>−−parent</b>
<i>commit-id</i></p>
<p style="margin-left:32%;">Give <b>import−tar</b>
additional parents of the new commit to create.</p>
<p style="margin-left:32%; margin-top: 1em">For example if
you track upstream’s git repository in some branch,
you can name that here to make it part of the history of
your debian branch.</p>
<p style="margin-left:22%;"><b>−−allow−no−parent</b></p>
<p style="margin-left:32%;">If dpm.importWithoutParent is
set to false via git config, git−dpm will not allow
import−new−upstream to be run without this
option or at least on −p option.</p>
<p style="margin-left:22%;"><b>−−rebase−patched</b></p>
<p style="margin-left:32%;">After recording the new
upstream branch, rebase the patched branch to the new
upstream branch.</p>
<p style="margin-left:22%;"><b>−−no−rebase−patched</b></p>
<p style="margin-left:32%;">Do not call
rebase−patched after recording the new upstream
branch. (This is currently the default, but that may change
in the future).</p>
<p style="margin-left:22%;"><b>−m</b>
<i>message</i></p>
<p style="margin-left:32%;">Commit message to use for the
new commit to the Debian branch recording the new file and
upstream branch.</p>
<p style="margin-left:22%;"><b>−−component</b>
<i>package</i><b>_</b><i>version</i><b>.orig−</b><i>component</i><b>.tar</b><i>.gz</i></p>
<p style="margin-left:32%;">Unpack the specified filename
into the <i>component</i> directory and record it so that
<b>prepare</b> and <b>status</b> know to check for it.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">
<p><b>−−init</b></p></td>
<td width="1%"></td>
<td width="68%">
<p>None of the branches yet exists, create them.</p></td></tr>
</table>
<p style="margin-left:32%; margin-top: 1em">As the branches
to operate on are derived from <b>HEAD</b> if no
<b>−−branch</b> option is given, you either need
<b>HEAD</b> point to an not yet existing branch (like
directly after <b>git init</b>) or you need you give a name
with <b>−−branch</b>. Otherwise one of the
branches already exists and you only get an error
message.</p>
<p style="margin-left:22%;"><b>−−branch</b>
<i>debianbranch</i></p>
<p style="margin-left:32%;">Don’t derive the debian
branch name from current <b>HEAD</b> but use
<i>debianbranch</i> instead. (And upstream branch namd and
patched branch name derived from that as usual).</p>
<p style="margin-left:22%;"><b>−−pristine−tar−commit</b>
| <b>−−ptc</b></p>
<p style="margin-left:32%;">Call <b>pristine−tar
commit</b> for all imported tarballs not yet found in the
pristine−tar branch.</p>
<p style="margin-left:22%;"><b>−−no−pristine−tar−commit</b></p>
<p style="margin-left:32%;">Do not call
<b>pristine−tar commit</b> for all imported tarballs
even if configured to do so by <b><br>
git config dpm.pristineTarCommit true</b> or by <b><br>
git config branch.</b>debianbranch<b>.dpmPristineTarCommit
true</b>.</p>
<p style="margin-left:22%;"><b>−−ignore−deletions</b>,
<b>−−dot−git−files=</b></p>
<p style="margin-left:32%;">Passed to merge−patched,
if called (only done if there were no patches
previously).</p>
<p style="margin-left:22%;"><b>−−upstream-author</b>
<i>author</i></p>
<p style="margin-left:32%;">Used as the
<b>−−author</b> argument to <b>git−dpm
import−tar</b>.</p>
<p style="margin-left:22%;"><b>−−upstream-date</b>
<i>date</i></p>
<p style="margin-left:32%;">Used as the
<b>−−date</b> argument to <b>git−dpm
import−tar</b> (especially <b>auto</b> is supported to
extract a date from the tar file).</p>
<p style="margin-left:11%;"><b>import−tar</b>
[<i>options</i>] <i>.tar-file</i></p>
<p style="margin-left:22%;">Create a new commit containing
the contents of the given file. The commit will not have any
parents, unless you give <b>−p</b> options. <b><br>
−p</b> <i>commit-id</i>|<b>−−parent</b>
<i>commit-id</i></p>
<p style="margin-left:32%;">Add the given commit as parent.
(Can be specified multiple times).</p>
<p style="margin-left:22%;"><b>−−branch</b>
<i>branchname</i></p>
<p style="margin-left:32%;">Create new branch
<i>branchname</i> if it does not already exist or replace
<i>branchname</i> with a commit created from the tarball
with the current <i>branchname</i> head as parent.</p>
<p style="margin-left:22%;"><b>−m</b>
<i>message</i></p>
<p style="margin-left:32%;">Do not start an editor for the
commit message, but use the argument instead.</p>
<p style="margin-left:22%;"><b>−−date</b>
<i>date</i></p>
<p style="margin-left:32%;">Date of the commit to
create.</p>
<p style="margin-left:32%; margin-top: 1em">If the value is
<b>auto</b> then the newest date of any file or directory in
the tarball is used.</p>
<p style="margin-left:22%;"><b>−−author</b>
<i>author</i></p>
<p style="margin-left:32%;">Author of the commit to create.
It has to be in the usual git format <i><br>
author</i> <b><</b><i>email</i><b>></b>.</p>
<p style="margin-left:11%;"><b>new−upstream</b>
[<i>options</i>] <i>.orig.tar</i> [<i>commit</i>]</p>
<p style="margin-left:22%; margin-top: 1em">If you changed
the upstream branch
(<b>upstream</b>|<b>upstream−</b><i>whatever</i>),
git−dpm needs to know which tarball this branch now
corresponds to and you have to rebase your patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>) to the
new upstream branch.</p>
<p style="margin-left:22%; margin-top: 1em">If there is a
second argument, this command first replaces your upstream
branch with the specified commit.</p>
<p style="margin-left:22%; margin-top: 1em">Then the new
upstream branch is recorded in your debian branch’s
<b>debian/.git−dpm</b> file.</p>
<p style="margin-left:22%; margin-top: 1em">If you
specified <b>−−rebase−patched</b> (or
short <b>−−rebase</b>), <b>git−dpm
rebase−patched</b> will be called to rebase your
patched branch on top of the new upstream branch.</p>
<p style="margin-left:22%; margin-top: 1em">After this (and
if the branch then looks like what you want), you still need
to call <b>git−dpm
merge−patched−into−debian</b> (or directly
<b>git−dpm update−patches</b>).</p>
<p style="margin-left:22%; margin-top: 1em"><b>WARNING</b>
to avoid any misunderstandings: You have to change the
upstream branch before using this command. It’s your
responsibility to ensure the contents of the tarball match
those of the upstream branch. <b><br>
−−rebase−patched</b></p>
<p style="margin-left:32%;">Automatically call
<b>git−dpm rebase−patched</b>.</p>
<p style="margin-left:22%;"><b>−−new−tarball−only</b></p>
<p style="margin-left:32%;">Don’t refuse operation if
the tarball changes but the upstream branch did not. (This
is only sensible if the tarball changed without changing its
contents, see the warning above).</p>
<p style="margin-left:22%;"><b>−m</b>
<i>message</i></p>
<p style="margin-left:32%;">Commit message to use for the
new commit to the Debian branch recording the new file and
upstream branch.</p>
<p style="margin-left:22%;"><b>−−amend</b></p>
<p style="margin-left:32%;">Replace the last commit instead
of creating a new one on top.</p>
<p style="margin-left:22%;"><b>−−component</b>
<i>filename</i></p>
<p style="margin-left:32%;">Record <i>filename</i> as
needed component source file (i.e. a
<i>sourcename</i><b>_</b><i>upstreamversion</i><b>.orig−</b><i>component</i><b>.tar.</b><i>compression</i>
file). It’s your responsible to have that file’s
contents already as part of your upstream branch (in a
<i>component</i> subdirectory).</p>
<p style="margin-left:32%; margin-top: 1em">(Recorded files
will be looksed for by <b>status</b> and <b>prepare</b>. The
list of recorded component source files is removed when a
new upstream branch or upstream <b>.orig</b> source file is
recorded).</p>
<p style="margin-left:22%;"><b>−−ignore−deletions</b>,
<b>−−ot−git−files=</b></p>
<p style="margin-left:32%;">Passed to merge−patched,
if called (which is only done if there were no patches
previously, so the new upstream branch is merged in
directly).</p>
<p style="margin-left:11%;"><b>rebase−patched</b></p>
<p style="margin-left:22%;">Try to rebase your current
patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>) to
your current current upstream branch
(<b>upstream</b>|<b>upstream−</b><i>whatever</i>).</p>
<p style="margin-left:22%; margin-top: 1em">If those
branches do not yet exist as git branches, they are
(re)created from the information recorded in
<b>debian/.git−dpm</b> first.</p>
<p style="margin-left:22%; margin-top: 1em">This is only a
convenience wrapper around git rebase that first tries to
determine what exactly is to rebase. If there are any
conflicts, git rebase will ask you to resolv them and tell
rebase to continue.</p>
<p style="margin-left:22%; margin-top: 1em">After this is
finished (and if the branch then looks like what you want),
you still need
<b>merge−patched−into−debian</b> (or
directly <b>update−patches</b>).</p>
<p style="margin-left:11%;"><b>tag</b> [ <i>options</i> ] [
<i>version</i> ]</p>
<p style="margin-left:22%;">Add tags to the uptream,
patched and debian branches. If no version is given, it is
taken from debian/changelog.</p>
<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
−−refresh</b></p>
<p style="margin-left:32%;">Overwrite the tags if they are
already there and differ (except upstream).</p>
<p style="margin-left:22%;"><b>−−refresh−upstream</b></p>
<p style="margin-left:32%;">Overwrite the upstream if that
is there and differs.</p>
<p style="margin-left:22%;"><b>−−allow−stale−patches</b></p>
<p style="margin-left:32%;">Don’t error out if
patches are not up to date. This is only useful if you are
importing historical data and want to tag it.</p>
<p style="margin-left:22%;"><b>−−named</b></p>
<p style="margin-left:32%;">Use the package name as part of
the names of the generated tags. (use <b>git config
dpm.tagsNamed true</b> to make this the default)</p>
<p style="margin-left:22%;"><b>−−with-name</b>
<i>name</i></p>
<p style="margin-left:32%;">Like <b>−−named</b>
but give the name to use.</p>
<p style="margin-left:22%;"><b>−−debian-tag</b>
<i>tag-name</i> <b><br>
−−patched-tag</b> <i>tag-name</i> <b><br>
−−upstream-tag</b> <i>tag-name</i></p>
<p style="margin-left:32%;">Specify the names of the tags
to generate. <b>%p</b> is replaced with the package name,
<b>%v</b> with the version (without epoch), <b>%u</b> with
the upstream version, <b>%e</b> with the epoch, <b>%%</b>
with a single <b>%</b>.</p>
<p style="margin-left:32%; margin-top: 1em">The defaults
are ’<b>%p−debian%e−%v</b>’,
’<b>%p−patched%e−%v</b>’ and
’<b>%p−upstream%e−%u</b>’ with
<b>−−named</b> and
’<b>debian%e−%v</b>’,
’<b>patched%e−%v</b>’ and
’<b>upstream%e−%u</b>’ without.</p>
<p style="margin-left:32%; margin-top: 1em">(Use <b>git
config</b> to set the values <b>dpm.debianTag</b>,
<b>dpm.patchedTag</b> and <b>dpm.upstreamTag</b> to change
the defaults of those values).</p>
<p style="margin-left:11%;"><b>ref−tag</b> [
<i>options</i> ] <i>commit</i> [ <i>version</i> ]</p>
<p style="margin-left:22%;">Like <b>tag</b>, but create
tags for <i>commit</i>, i.e. <i>commit</i> will get the
debian tag and the other tags are placed where the
<b>debian/.git−dpm</b> file of that commit points
to.</p>
<p style="margin-left:22%; margin-top: 1em">So it is mostly
equivalent to: <b><br>
git checkout −b temp</b> <i>commit</i> <b><br>
git−dpm tag</b> [<i>options</i>] [<i>version</i>]
<b><br>
git checkout</b> <i>previous-head</i> <b><br>
git branch −D temp</b></p>
<p style="margin-left:22%; margin-top: 1em">Options like
<b>tag</b>.</p>
<p style="margin-left:11%;"><b>apply−patch</b> [
<i>options...</i> ] [ <i>filename</i> ]</p>
<p style="margin-left:22%;">Switch to the patched branch
(assuming it is up to date, use checkout−patched first
to make sure or get an warning), and apply the patch given
as argument or from stdin. <b><br>
−−author</b> <i>author <email></i></p>
<p style="margin-left:32%;">Override the author to be
recorded.</p>
<p style="margin-left:22%;"><b>−−defaultauthor</b>
<i>author <email></i></p>
<p style="margin-left:32%;">If no author could be
determined from the commit, use this.</p>
<p style="margin-left:22%;"><b>−−date</b>
<i>date</i></p>
<p style="margin-left:32%;">Date to record this patch
originally be from if non found.</p>
<p style="margin-left:22%;"><b>−−dpatch</b></p>
<p style="margin-left:32%;">Parse patch as dpatch patch
(Only works for dpatch patches actually being a patch, might
silently fail for others).</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">
<p><b>−−cdbs</b></p></td>
<td width="1%"></td>
<td width="68%">
<p>Parse patch as cdbs simple−patchsys.mk patch (Only
works for dpatch patches actually being a patch, might
silently fail for others).</p></td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="9%">
<p><b>−−edit</b></p></td>
<td width="1%"></td>
<td width="68%">
<p>Start an editor before doing the commit (In case you are
too lazy to amend).</p></td></tr>
</table>
<p style="margin-left:22%;"><b>−−record-name</b></p>
<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to tell <b>update−patches</b> to export it with the
same name again.</p>
<p style="margin-left:22%;"><b>−−name</b>
<i>name</i></p>
<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to tell <b>update−patches</b> to use <i>name</i> as
filename to store this patch into (relative to
<b>debian/patches</b>).</p>
<p style="margin-left:22%;"><b>−−category</b>
<i>name</i></p>
<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to tell <b>update−patches</b> to always export
this patch into a subdirectory <i>name</i> of
<b>debian/patches</b>.</p>
<p style="margin-left:11%;"><b>cherry−pick</b> [
<i>options...</i> ] <i>commit</i></p>
<p style="margin-left:22%;">Recreate the patched branch and
cherry−pick the given commit. Then merge that back
into the debian branch and update the debian/patches
directory (i.e. mostly equivalent to checkout−patched,
git’s cherry−pick, and update−patches).
<b><br>
−−merge−only</b></p>
<p style="margin-left:32%;">Only merge the patched branch
back into the debian branch but do not update the patches
directory (You’ll need to run update−patches
later to get this done).</p>
<p style="margin-left:22%;"><b>−e</b> |
<b>−−edit</b></p>
<p style="margin-left:32%;">Passed to git’s
cherry−pick: edit the commit message picked.</p>
<p style="margin-left:22%;"><b>−s</b> |
<b>−−signoff</b></p>
<p style="margin-left:32%;">Passed to git’s
cherry−pick: add a Signed−off−by
header</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">
<p><b>−x</b></p></td>
<td width="7%"></td>
<td width="68%">
<p>Passed to git’s cherry−pick: add a line
describing what was picked</p></td></tr>
</table>
<p style="margin-left:22%;"><b>−m</b> <i>num</i> |
<b>−−mainline</b> <i>num</i></p>
<p style="margin-left:32%;">Passed to git’s
cherry−pick: allow picking a merge by specifign the
parent to look at.</p>
<p style="margin-left:22%;"><b>−−repick</b></p>
<p style="margin-left:32%;">Don’t abort if the
specified commit is already contained.</p>
<p style="margin-left:22%;"><b>−−allow−nonlinear</b>,
<b>−−ignore−deletions</b>,
<b>−−dot−git−files=</b></p>
<p style="margin-left:32%;">Passed to update−patches,
if called.</p>
<p style="margin-left:32%; margin-top: 1em">passed to
merge−patched−into−debian and
update−patches.</p>
<p style="margin-left:22%;"><b>−−keep−branch</b></p>
<p style="margin-left:32%;">do not remove the patched
branch when it is no longer needed.</p>
<p style="margin-left:22%;"><b>−−amend</b></p>
<p style="margin-left:32%;">passed to
merge−patched−into−debian: amend the last
commit in the debian branch.</p>
<p style="margin-left:11%;"><b>import−dsc</b></p>
<p style="margin-left:22%;">Import a debian source package
from a .dsc file. This can be used to create a new project
or to import a source package into an existing project.</p>
<p style="margin-left:22%; margin-top: 1em">While a
possible old state of a project is recorded as parent
commit, the state of the old debian branch is not taken into
account. Especially all file deletions and .gitignore files
and the like need to be reapplied/readded afterwards.
(Assumption is that new source package versions from outside
might change stuff significantly, so old information might
more likely be outdated. And reapplying it is easier then
reverting such changes.)</p>
<p style="margin-left:22%; margin-top: 1em">First step is
importing the <b>.orig.tar</b> file and possible
<b>.orig−</b><i>component</i><b>.tar</b> files. You
can either specify a branch to use. Otherwise
<b>import−dsc</b> will look if the previous state of
this project already has the needed file so the old upstream
branch can be reused. If there is non, the file will be
imported as a new commit, by default with a possible
previous upstream branch as parent.</p>
<p style="margin-left:22%; margin-top: 1em">Then
<b>import−dsc</b> will try to import the source
package in the state as <b>dpkg−source −x</b>
would create it. (That is applying the .diff and making
<b>debian/rules</b> executeable for 1.0 format packages and
replacing the <b>debian</b> directory with the contents of a
.debian.tar and applying possible
<b>debian/patches/series</b> for 3.0 format packages). This
is later referred to as verbatim import.</p>
<p style="margin-left:22%; margin-top: 1em">If it is a 1.0
source format package, <b>import−dsc</b> then looks
for a set of supported patch systems and tries to apply
those patches. Those are then merged with the verbatim state
into the new debian branch.</p>
<p style="margin-left:22%; margin-top: 1em">Then a
<b>debian/.git−dpm</b> file is created and a possible
old state of the project added as parent.</p>
<p style="margin-left:22%; margin-top: 1em">Note that
<b>dpkg−source</b> is not used to extract packages,
but they are extracted manually. Especially
<b>git−apply</b> is used instead of <b>patch</b>.
While this generally works (and <b>git−dpm</b> has
some magic to work around some of
<b>git−apply</b>’s shortcomings), unclean
patches might sometimes need a <b>−C0</b> option and
then in same cases be applied at different positions than
where <b>patch</b> would apply them.</p>
<p style="margin-left:22%; margin-top: 1em">General
options: <b><br>
−b</b> | <b>−−branch</b>
<i>branch-name</i></p>
<p style="margin-left:32%;">Don’t look at the current
HEAD, but import the package into the git−dpm project
<i>branchname</i> or create a new project (if that branch
does not yet exist).</p>
<p style="margin-left:22%;"><b>−−verbatim</b>
<i>branch-name</i></p>
<p style="margin-left:32%;">After <b>import−dsc</b>
has completed successfully, <i>branch-name</i> will contain
the verbatim import of the .dsc file. If a branch of that
name already exists, the new verbatim commit will also have
the old as parent. (This also causes the verbatim commit not
being amended with other changes, which can result in more
commits).</p>
<p style="margin-left:22%;"><b>−−use−changelog</b></p>
<p style="margin-left:32%;">Parse debian/changelog of the
imported package. Use the description as commit messages and
the author and time as default for patches and import
commits without that information. (Warning: may still
contain some rough edges).</p>
<p style="margin-left:22%; margin-top: 1em">Options about
creating the upstream branch: <b><br>
−−upstream−to−use</b>
<i>commit</i></p>
<p style="margin-left:32%;">Do not import the .orig.tar nor
try to reuse an old import, but always use the <i>commit</i>
specified.</p>
<p style="margin-left:32%; margin-top: 1em">It is your
responsibility that this branch is similar enough to the
.orig.tar file plus possible .orig-component.tar in their
respective directories. (As usual, similar enough means:
Does not miss any files that your patches touch or your
build process requires (or recreates unless <b>debian/rules
clean</b> removes them again). Every file different than in
.orig.tar or not existing there you must delete in the
resulting debian branch. No patch may touch those
files.)</p>
<p style="margin-left:32%; margin-top: 1em">Use with care.
Nothing will warn you even if you use the contents of a
totally wrong upstream version.</p>
<p style="margin-left:22%;"><b>−−detached−upstream</b></p>
<p style="margin-left:32%;">If importing a .orig.tar as new
commit, do not make an possible commit for an old upstream
version parent.</p>
<p style="margin-left:22%;"><b>−−upstream−parent</b>
<i>commit</i></p>
<p style="margin-left:32%;">Add <i>commit</i> as
(additional) parent if importing a new upstream version.</p>
<p style="margin-left:32%; margin-top: 1em">(This can for
example be used to make upstream’s git history part of
your package’s history and thus help git when
cherry-picking stuff).</p>
<p style="margin-left:22%;"><b>−−allow−no−parent</b></p>
<p style="margin-left:32%;">If dpm.importWithoutParent is
set to false via git config, git−dpm will not allow
import−dsc to be run without this option or at least
on −−upstream−parent option.</p>
<p style="margin-left:22%;"><b>−−pristine−tar−commit</b>
|<b>−−ptc</b></p>
<p style="margin-left:32%;">Call <b>pristine−tar
commit</b> for all tarballs imported after the rest of the
import−dsc command was successful.</p>
<p style="margin-left:22%;"><b>−−no−pristine−tar−commit</b></p>
<p style="margin-left:32%;">Do not call
<b>pristine−tar commit</b> for all imported tarballs
even if configured to do so by <b><br>
git config dpm.pristineTarCommit true</b> or by <b><br>
git config branch.</b>debianbranch<b>.dpmPristineTarCommit
true</b>.</p>
<p style="margin-left:22%;"><b>−−upstream-author</b>
<i>author</i></p>
<p style="margin-left:32%;">Used as the
<b>−−author</b> argument to <b>git−dpm
import−tar</b>.</p>
<p style="margin-left:22%;"><b>−−upstream-date</b>
<i>date</i></p>
<p style="margin-left:32%;">Used as the
<b>−−date</b> argument to <b>git−dpm
import−tar</b> (especially <b>auto</b> is supported to
extract a date from the tar file).</p>
<p style="margin-left:22%; margin-top: 1em">Options about
applying patches: <b><br>
−f</b> |
<b>−−force−commit−reuse</b></p>
<p style="margin-left:32%;">Only look at parent and tree
and no longer at the description when trying to reuse
commits importing patches from previous package
versions.</p>
<p style="margin-left:22%;"><b>−C</b><i>num</i> |
<b>−−patch−context</b> <i>num</i></p>
<p style="margin-left:32%;">Passed as
<b>−C</b><i>num</i> to <b>git−apply</b>.
Specifies the number of context lines that must match.</p>
<p style="margin-left:22%;"><b>−−dpatch−allow−empty</b></p>
<p style="margin-left:32%;">Do not error out if a dpatch
file does not change anything when treated as patch.</p>
<p style="margin-left:32%; margin-top: 1em">As dpatch files
can be arbitrary scripts, <b>git−dpm</b> has some
problems detecting if they are really patches. (It can only
cope with patches). If a script that is not a patch is
treated as patch that usually results in patch not modify
anything, thus those are forbidden without this option.</p>
<p style="margin-left:22%;"><b>−−patch−system</b>
<i>mode</i></p>
<p style="margin-left:32%;">Specify what patch system is
used for source format 1.0 packages. <b><br>
auto</b> (this is the default)</p>
<p style="margin-left:43%;">Try to determine what patch
system is used by looking at <b>debian/rules</b> (and
<b>debian/control</b>).</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="6%">
<p><b>none</b></p></td>
<td width="5%"></td>
<td width="57%">
<p>Those are not the patches you are looking for.</p></td></tr>
</table>
<p style="margin-left:32%;"><b>history</b></p>
<p style="margin-left:43%;">Don’t try to find any
patches in the .diff (like <b>none</b>). If if the project
already exists and the upstream tarball is the same, create
the patched state of the new one by using the patches of the
old one and adding a patch of top bringing it to the new
state.</p>
<p style="margin-left:43%; margin-top: 1em">If you import
multiple revisions of some package, where each new revision
added at most a single change to upstream, this option
allows you to almost automatically create a proper set of
patches (ideally only missing descriptions).</p>
<p style="margin-left:43%; margin-top: 1em">If there are
same changes and reverts those will be visibile in the
patches created, so this mode is not very useful in that
case.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="8%">
<p><b>quilt</b></p></td>
<td width="3%"></td>
<td width="57%">
<p>Extract and apply a <b>debian/patches/series</b> quilt
like series on top of possible upstream changes found in the
.diff file.</p></td></tr>
</table>
<p style="margin-left:32%;"><b>quilt−first</b></p>
<p style="margin-left:43%;">As the <b>quilt</b> mode, but
apply the patches to an unmodified upstream first and then
cherry−pick the changes found in the .diff file.</p>
<p style="margin-left:43%; margin-top: 1em">As this is not
the order in which patches are applied in a normal
unpack/build cycle, this will fail if those changes are not
distinct enough (for example when patches depend on changes
done in the .diff).</p>
<p style="margin-left:43%; margin-top: 1em">But if the
.diff only contains unrelated changes which varies with each
version, this gives a much nicer history, as the commits for
the patches can more easily be reused.</p>
<p style="margin-left:32%;"><b>quilt−applied</b></p>
<p style="margin-left:43%;">As the <b>quilt−first</b>
mode, but assume the patches are already applied in the
.diff, so apply them on top of an unmodified upstream and
then add a commit bringing it to the state in the .diff. (Or
not if that patch would be empty).</p>
<p style="margin-left:32%;"><b>dpatch</b> |
<b>dpatch−first</b> | <b>dpatch−applied</b></p>
<p style="margin-left:43%;">Like the <b>quilt</b> resp.
<b>quilt−first</b> resp. <b>quilt−applied</b>
modes, but instead look for dpatch-style patches in
<b>debian/patches/00list</b>.</p>
<p style="margin-left:43%; margin-top: 1em">Note that only
patches are supported and not dpatch running other
commands.</p>
<p style="margin-left:32%;"><b>simple</b> |
<b>simple−first</b> | <b>simple−applied</b></p>
<p style="margin-left:43%;">Like the <b>quilt</b> resp.
<b>quilt−first</b> resp. <b>quilt−applied</b>
modes, but instead assume <b>debian/patches/</b> contains
patches suiteable for cdbs’s
<b>simple−patchsys.mk</b>.</p>
<p style="margin-left:22%;"><b>−−patch−author</b>
"<i>name</i> <<i>email</i>>"</p>
<p style="margin-left:32%;">Set the author for all git
commits importing patches.</p>
<p style="margin-left:22%;"><b>−−patch−default−author</b>
"<i>name</i> <<i>email</i>>"</p>
<p style="margin-left:32%;">Set an author for all patches
not containing author information (or where
<b>git−dpm</b> cannot determine it).</p>
<p style="margin-left:22%;"><b>−−edit−patches</b></p>
<p style="margin-left:32%;">For every patch imported, start
an editor for the commit message.</p>
<p style="margin-left:22%;"><b>−−record−patch−category</b></p>
<p style="margin-left:32%;">Add a <b>Patch-Category:</b>
field to each imported patch that is in a subdirectory of
<b>debian/patches</b>. This causes
<b>update−patches</b> to store it in the same
subdirectory.</p>
<p style="margin-left:22%;"><b>−−record−patch−name</b></p>
<p style="margin-left:32%;">Add a <b>Patch-Name:</b> field
to each imported patch with its name. This causes
<b>update−patches</b> to store it under its original
name.</p>
<p style="margin-left:11%;"><b>record−dsc</b>
[<i>options</i>] <i>commit .dsc-file</i></p>
<p style="margin-left:22%;">Store a pristine .dsc file in a
<b>dscs</b> branch after storing the files it contains using
pristine−tar.</p>
<p style="margin-left:22%; margin-top: 1em">The first
argument is an tag or commit storing the
<b>git−dpm</b> project in the state belonging to the
<b>.dsc</b> file and the second argument is the <b>.dsc</b>
file itself. The files it references are expected in the
same directory as the file itself (if they are needed).</p>
<p style="margin-left:22%; margin-top: 1em">Some checks are
done to make sure the file and its contents are named
problerly and match the commit in question, but only cursory
to avoid obvious mistakes (for example only the version is
checked, but .debian.tar is not unpacked to check the files
are really the same, for example).</p>
<p style="margin-left:22%; margin-top: 1em">Options:
<b><br>
−−create−branch</b></p>
<p style="margin-left:32%;">Create a new <b>dscs</b>
branch.</p>
<p style="margin-left:22%;"><b>−−allow−unsigned</b></p>
<p style="margin-left:32%;">Allow recording a unsigned
<b>.dsc</b> file. This usually defeats the point of storing
them at all.</p>
<h2>the debian/.git−dpm file
<a name="the debian/.git−dpm file"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">You should not
need to know about the contents if this file except for
debuging git−dpm.</p>
<p style="margin-left:11%; margin-top: 1em">The file
contains 8 lines, but future version may contain more.</p>
<p style="margin-left:11%; margin-top: 1em">The first line
is hint what this file is about and ignored.</p>
<p style="margin-left:11%; margin-top: 1em">Then there are
4 git commit ids for the recorded states:</p>
<p style="margin-left:22%; margin-top: 1em">First the state
of the patched branch when the patches in
<b>debian/patches</b> were last updated.</p>
<p style="margin-left:22%; margin-top: 1em">Then the state
of the patched branch when it was last merged into the
debian branch.</p>
<p style="margin-left:22%; margin-top: 1em">Then the state
upstream branch when the patched branch was last merged.</p>
<p style="margin-left:22%; margin-top: 1em">Finally the
upstream branch.</p>
<p style="margin-left:11%; margin-top: 1em">The following 3
lines are the filename, the sha1 checksum and the size of
the origtarball belonging to the recorded upstream
branch.</p>
<h2>SHORTCUTS
<a name="SHORTCUTS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Most commands
also have shorter aliases, to avoid typing:</p>
<p style="margin-left:11%; margin-top: 1em">update−patches:
up, u−p, ci <br>
prepare: prep <br>
checkout−patched: co, c−p <br>
rebase−patched: r−p <br>
new−upstream−branch: new−upstream,
n−u <br>
apply−patch: a−p <br>
import−tar: i−t <br>
import−new−upstream: i−n−u, inu <br>
cherry−pick: c−p</p>
<h2>BRANCHES
<a name="BRANCHES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">the upstream
branch
(<b>upstream</b>|<b>upstream−</b><i>whatever</i>)</p>
<p style="margin-left:22%;">This branch contains the
upstream sources. It contents need to be equal enough to the
contents in your upstream tarball.</p>
<p style="margin-left:22%; margin-top: 1em">Equal enough
means that dpkg−source should see no difference
between your patched tree and and original tarball
unpackaged, the patched applied and <b>debian/rules
clean</b> run. Usually it is easiest to just store the
verbatim contents of your orig tarball here. Then you can
also use it for pristine tar.</p>
<p style="margin-left:22%; margin-top: 1em">This branch may
contain a debian/ subdirectory, which will usually be just
ignored.</p>
<p style="margin-left:22%; margin-top: 1em">You can either
publish that branch or make it only implicitly visible via
the <b>debian/.git−dpm</b> file in the debian
branch.</p>
<p style="margin-left:22%; margin-top: 1em">While it
usually makes sense that newer upstream branches contain
older ones, this is not needed. You should be able to switch
from one created yourself or by some foreign-vcs importing
tool generated one to an native upstream branch or vice
versa without problems. Note that since the debian branch
has the patched branch as ancestor and the patched branch
the upstream branch, your upstream branches are part of the
history of your debian branch. Which has the advantage that
you can recreate the exact state of your branches from your
history directly (like <b>git checkout −b oldstate</b>
<i>myoldtagorshaofdebianbranchcommit</i> <b>; git−dpm
prepare ; git checkout unstable−oldstate</b>) but the
disadvantage that to remove those histories from your
repository you have to do some manual work.</p>
<p style="margin-left:11%;">the patched branch
(<b>patched</b>|<b>patched−</b><i>whatever</i>)</p>
<p style="margin-left:22%;">This branch contains your
patches to the upstream source. (which of course means it is
based on your upstream branch).</p>
<p style="margin-left:22%; margin-top: 1em">Every commit
will be stored as a single patch in the resulting
package.</p>
<p style="margin-left:22%; margin-top: 1em">To help git
generate a linear patch series, this should ideal be a
linear chain of commits, whose description are helpful for
other people.</p>
<p style="margin-left:22%; margin-top: 1em">As this branch
is regulary rebased, you should not publish it. Instead you
can recreate this branch using <b>git−dpm
checkout−patched</b> using the information stored in
<b>debian/.git−dpm</b>.</p>
<p style="margin-left:22%; margin-top: 1em">You are not
allowed to change the contents of the <b>debian/</b>
subdirectory in this branch. Renaming files or deleting
files usuall causes unecesary large patches.</p>
<p style="margin-left:11%;">the debian branch
(<b>master</b>|<i>whatever</i>)</p>
<p style="margin-left:22%;">This is the primary branch.</p>
<p style="margin-left:22%; margin-top: 1em">This branch
contains the <b>debian/</b> directory and has the patched
branch merged in.</p>
<p style="margin-left:22%; margin-top: 1em">Every change
not in <b>debian/</b>, <b>.git</b><i>*</i> or deleting files
must be done in the patched branch.</p>
<p style="margin-left:11%;">alternative branch names</p>
<p style="margin-left:22%;">You can specify alternate
branch names for upstream and patched branches of a specific
debian branch, or force a branch to be a debian branch that
would normaly be considered e.g. upstream branch of another
branch by adding <b>dpmUpstreamBranch</b> and
<b>dpmPatchedBranch</b> configure items for the debian
branch in question (you need both, only one is treated as
error).</p>
<p style="margin-left:22%; margin-top: 1em">The following
example is a no-op for all practical purposes: <b><br>
git config branch.master.dpmUpstreamBranch upstream <br>
git config branch.master.dpmPatchedBranch patched</b></p>
<h2>COPYRIGHT
<a name="COPYRIGHT"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Copyright
© 2009,2010 Bernhard R. Link <br>
This is free software; see the source for copying
conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<h2>REPORTING BUGS AND ISSUES
<a name="REPORTING BUGS AND ISSUES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">You can report
bugs or feature suggestions to
git−dpm−devel@lists.alioth.debian.org or tome.
Please send questions to
git−dpm−user@lists.alioth.debian.org or to me at
brlink@debian.org.</p>
<hr>
</body>
</html>
|