gbp-pq.sgml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <refentry id="man.gbp.pq">
  2. <refentryinfo>
  3. <address>
  4. &dhemail;
  5. </address>
  6. <author>
  7. &dhfirstname;
  8. &dhsurname;
  9. </author>
  10. </refentryinfo>
  11. <refmeta>
  12. <refentrytitle>gbp-pq</refentrytitle>
  13. &dhsection;
  14. </refmeta>
  15. <refnamediv>
  16. <refname>gbp-pq</refname>
  17. <refpurpose>Manage quilt patches on patch queue branches in git</refpurpose>
  18. </refnamediv>
  19. <refsynopsisdiv>
  20. <cmdsynopsis>
  21. &gbp-pq;
  22. &man.common.options.synopsis;
  23. <arg><option>--[no-]patch-numbers</option></arg>
  24. <arg><option>--patch-num-format=</option><replaceable>format</replaceable></arg>
  25. <arg><option>--[no-]renumber</option></arg>
  26. <arg><option>--topic=</option><replaceable>topic</replaceable></arg>
  27. <arg><option>--time-machine=</option><replaceable>num</replaceable></arg>
  28. <arg><option>--[no-]drop</option></arg>
  29. <arg><option>--force</option></arg>
  30. <arg><option>--meta-closes=bug-close-tags</option></arg>
  31. <arg><option>--meta-closes-bugnum=bug-number-format</option></arg>
  32. <group choice="plain">
  33. <arg><option>drop</option></arg>
  34. <arg><option>export</option></arg>
  35. <arg><option>import</option></arg>
  36. <arg><option>rebase</option></arg>
  37. <arg><option>switch</option></arg>
  38. </group>
  39. </cmdsynopsis>
  40. </refsynopsisdiv>
  41. <refsect1>
  42. <title>DESCRIPTION</title>
  43. <para>
  44. &gbp-pq; helps one to manage quilt patches in &debian; packages that are
  45. maintained with &gbp;. This is especially useful with packages using the
  46. 3.0 (quilt) source format. With &gbp-pq;, you can maintain the quilt patches
  47. that should be applied to a package on a separate branch called patch-queue
  48. branch. So if your &debian; package lives on
  49. <replaceable>master</replaceable>, the associated patch-queue branch will be
  50. called <replaceable>patch-queue/master</replaceable>.
  51. </para>
  52. <para>
  53. See <ulink url="https://honk.sigxcpu.org/piki/development/debian_packages_in_git/"></ulink>
  54. for example workflows.
  55. </para>
  56. </refsect1>
  57. <refsect1>
  58. <title>ACTIONS</title>
  59. <variablelist>
  60. <varlistentry>
  61. <term><option>import</option>
  62. </term>
  63. <listitem>
  64. <para>
  65. Create a patch queue branch from quilt patches in debian/patches/
  66. that are listed in debian/patches/series. The patches must apply
  67. without fuzz.
  68. </para>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry>
  72. <term><option>export</option>
  73. </term>
  74. <listitem>
  75. <para>
  76. Export the patches on the patch-queue branch associated to the
  77. current branch into a quilt patch series in debian/patches/ and
  78. update the series file.
  79. </para>
  80. </listitem>
  81. </varlistentry>
  82. <varlistentry>
  83. <term><option>rebase</option>
  84. </term>
  85. <listitem>
  86. <para>
  87. Switch to the patch-queue branch associated to the current branch and
  88. rebase it against the current branch.
  89. </para>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry>
  93. <term><option>drop</option>
  94. </term>
  95. <listitem>
  96. <para>
  97. Drop (delete) the patch queue associated to the current branch. So if
  98. you're on branch <replaceable>foo</replaceable>, this would drop
  99. branch <replaceable>patch-queue/foo</replaceable>.
  100. </para>
  101. </listitem>
  102. </varlistentry>
  103. <varlistentry>
  104. <term><option>apply</option>
  105. </term>
  106. <listitem>
  107. <para>
  108. Add a single patch to the patch-queue similar to using
  109. <command>git-am</command>. Use <option>--topic</option> if you want
  110. the patch to appear in a separate subdir when exporting the patch queue
  111. using <option>export</option>. This can be used to separate upstream
  112. patches from &debian; specific patches.
  113. </para>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry>
  117. <term><option>switch</option>
  118. </term>
  119. <listitem>
  120. <para>
  121. Switch to the patch-queue branch if on the base branch and switch
  122. to base branch if on patch-queue branch.
  123. </para>
  124. </listitem>
  125. </varlistentry>
  126. </variablelist>
  127. </refsect1>
  128. <refsect1>
  129. <title>OPTIONS</title>
  130. <variablelist>
  131. &man.common.options.description;
  132. <varlistentry>
  133. <term><option>--[no-]patch-numbers</option>
  134. </term>
  135. <listitem>
  136. <para>
  137. Whether or not the patch files should be prefixed with a number.
  138. The default is to export patches with patch numbers. Note,
  139. however, that this normally affects patches whose names are
  140. automatically generated, and has no effect on exporting patches
  141. which have a <option>Gbp[-Pq]: Name</option> tag, since the
  142. name specified is preserved unless the <option>--renumber</option>
  143. option is used.
  144. </para>
  145. </listitem>
  146. </varlistentry>
  147. <varlistentry>
  148. <term><option>--patch-num-format=</option><replaceable>format</replaceable>
  149. </term>
  150. <listitem>
  151. <para>
  152. The format specifier for patch number prefixes. The default format is '%04d-'.
  153. </para>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry>
  157. <term><option>--[no-]renumber</option>
  158. </term>
  159. <listitem>
  160. <para>
  161. Whether or not to renumber patches exported from the patch queue,
  162. instead of preserving numbers specified in
  163. <option>Gbp-Pq: Name</option> tags. The default is not to renumber
  164. patches. Useful when patches need to be renamed for the sake of
  165. uniformity. For example, using <option>--renumber</option> with
  166. <option>--no-patch-num</option> will strip all numeric prefixes from
  167. exported patches.
  168. </para>
  169. </listitem>
  170. </varlistentry>
  171. <varlistentry>
  172. <term><option>--topic=</option><replaceable>topic</replaceable>
  173. </term>
  174. <listitem>
  175. <para>
  176. Topic to use when importing a single patch
  177. </para>
  178. </listitem>
  179. </varlistentry>
  180. <varlistentry>
  181. <term><option>--time-machine=</option><replaceable>NUM</replaceable>
  182. </term>
  183. <listitem>
  184. <para>
  185. When importing a patch queue fails, go back commit-by-commit on the
  186. current branch to check if the patch-queue applies there. Do this at
  187. most <replaceable>NUM</replaceable> times. This can be useful if the
  188. patch-queue doesn't apply to the current branch HEAD anymore, e.g.
  189. after importing a new upstream version.
  190. </para>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry>
  194. <term><option>--[no-]drop</option></term>
  195. <listitem>
  196. <para>Whether to drop (delete) the patch queue branch after
  197. a successful export</para>
  198. </listitem>
  199. </varlistentry>
  200. <varlistentry>
  201. <term><option>--force</option></term>
  202. <listitem>
  203. <para>In case of <option>import</option>, import even if the branch already
  204. exists</para>
  205. </listitem>
  206. </varlistentry>
  207. <varlistentry>
  208. <term><option>--meta-closes=</option><replaceable>bug-close-tags</replaceable>
  209. </term>
  210. <listitem>
  211. <para>
  212. What meta tags to look for to generate a commit message when
  213. using <option>export</option> <option>--commit</option>.
  214. The default is <literal>'Closes|LP'</literal> to support Debian and Launchpad.
  215. </para>
  216. </listitem>
  217. </varlistentry>
  218. <varlistentry>
  219. <term><option>--meta-closes-bugnum=</option><replaceable>bug-number-format</replaceable>
  220. </term>
  221. <listitem>
  222. <para>
  223. What regular expression should be used to parse out the
  224. bug number when using
  225. <option>export</option> <option>--commit</option>. The
  226. default is <literal>'(?:bug|issue)?\#?\s?\d+'</literal>.
  227. See <xref linkend="man.gbp.dch"/> for details.
  228. </para>
  229. </listitem>
  230. </varlistentry>
  231. </variablelist>
  232. </refsect1>
  233. <refsect1>
  234. <title>TAGS</title>
  235. <para>
  236. When exporting patches from a patch-queue branch, &gbp-pq; will look at the
  237. patch header for special tags it recognizes. All tags need to start at the
  238. first column and require at least one whitespace after the colon.
  239. </para>
  240. <variablelist>
  241. <varlistentry>
  242. <term><option>Gbp[-Pq]: Ignore</option>
  243. </term>
  244. <listitem>
  245. <para>
  246. Ignores the commit, no patch is generated out of it.
  247. </para>
  248. </listitem>
  249. </varlistentry>
  250. <varlistentry>
  251. <term><option>Gbp[-Pq]: Name</option> <replaceable>name</replaceable>
  252. </term>
  253. <listitem>
  254. <para>
  255. The name to use for the patch when running
  256. <screen>&gbp-pq; export</screen>
  257. If unset, it will be formatted like
  258. <command>git am</command> would format it.
  259. </para>
  260. </listitem>
  261. </varlistentry>
  262. <varlistentry>
  263. <term><option>Gbp[-Pq]: Topic</option> <replaceable>topic</replaceable>
  264. </term>
  265. <listitem>
  266. <para>
  267. Moves the patch into a subdir called <replaceable>topic</replaceable>
  268. when running <screen>&gbp-pq; export</screen> This allows for some
  269. structure below <filename>debian/patches</filename>.
  270. </para>
  271. </listitem>
  272. </varlistentry>
  273. <varlistentry>
  274. <term><option>Gbp-Pq-Topic:</option> <replaceable>topic</replaceable>
  275. </term>
  276. <listitem>
  277. <para>
  278. Deprecated: use <option>Gbp[-Pq]: Topic</option>
  279. <replaceable>topic</replaceable> instead.
  280. </para>
  281. </listitem>
  282. </varlistentry>
  283. </variablelist>
  284. </refsect1>
  285. <refsect1>
  286. <title>SEE ALSO</title>
  287. <para>
  288. <xref linkend="man.gbp.buildpackage"/>,
  289. <citerefentry>
  290. <refentrytitle>dpkg-source</refentrytitle>
  291. <manvolnum>1</manvolnum>
  292. </citerefentry>,
  293. <citerefentry>
  294. <refentrytitle>quilt</refentrytitle>
  295. <manvolnum>1</manvolnum>
  296. </citerefentry>,
  297. <xref linkend="man.gbp.conf"/>
  298. </para>
  299. </refsect1>
  300. <refsect1>
  301. <title>AUTHOR</title>
  302. <para>
  303. &dhusername; &dhemail;
  304. </para>
  305. </refsect1>
  306. </refentry>