.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "GBP-PQ" "1" "07 February 2017" "" "git-buildpackage Manual"
.SH NAME
gbp-pq \- Manage quilt patches on patch queue branches in git
.SH SYNOPSIS
\fBgbp\~pq\fR [ \fB--version\fR ] [ \fB--help\fR ] [ \fB--verbose\fR ] [ \fB--color=\fI[auto|on|off]\fB\fR ] [ \fB--color-scheme=\fICOLOR_SCHEME\fB\fR ] [ \fB--[no-]patch-numbers\fR ] [ \fB--patch-num-format=\fIformat\fB\fR ] [ \fB--[no-]renumber\fR ] [ \fB--topic=\fItopic\fB\fR ] [ \fB--time-machine=\fInum\fB\fR ] [ \fB--[no-]drop\fR ] [ \fB--force\fR ] [ \fB--meta-closes=bug-close-tags\fR ] [ \fB--meta-closes-bugnum=bug-number-format\fR ] [ \fB--pq-from=\fI[DEBIAN|TAG]\fB\fR ] [ \fB--upstream-tag=\fItag-format\fB\fR ] \fBdrop\fR | \fBexport\fR | \fBimport\fR | \fBrebase\fR | \fBswitch\fR
.SH "DESCRIPTION"
.PP
\fBgbp\~pq\fR helps one to manage quilt patches in Debian packages that are
maintained with \fBgbp\fR\&. This is especially useful with packages using the
3.0 (quilt) source format. With \fBgbp\~pq\fR, you can maintain the quilt patches
that should be applied to a package on a separate branch called patch-queue
branch. So if your Debian package lives on
\fImaster\fR, the associated patch-queue branch will be
called \fIpatch-queue/master\fR\&.
.PP
See
for example workflows.
.SH "ACTIONS"
.TP
\fBimport \fR
Create a patch queue branch from quilt patches in debian/patches/
that are listed in debian/patches/series. The patches must apply
without fuzz.
.TP
\fBexport \fR
Export the patches on the patch-queue branch associated to the
current branch into a quilt patch series in debian/patches/ and
update the series file.
.TP
\fBrebase \fR
Switch to the patch-queue branch associated to the current branch and
rebase it against the current branch.
.TP
\fBdrop \fR
Drop (delete) the patch queue associated to the current branch. So if
you're on branch \fIfoo\fR, this would drop
branch \fIpatch-queue/foo\fR\&.
.TP
\fBapply \fR
Add a single patch to the patch-queue similar to using
\fBgit-am\fR\&. Use \fB--topic\fR if you want
the patch to appear in a separate subdir when exporting the patch queue
using \fBexport\fR\&. This can be used to separate upstream
patches from Debian specific patches.
.TP
\fBswitch \fR
Switch to the patch-queue branch if on the base branch and switch
to base branch if on patch-queue branch.
.SH "OPTIONS"
.TP
\fB--version\fR
Print version of the program, i.e. version of the git-buildpackage
suite
.TP
\fB-v\fR
.TP
\fB--verbose\fR
Verbose execution
.TP
\fB-h\fR
.TP
\fB--help\fR
Print help and exit
.TP
\fB--color=\fI[auto|on|off]\fB \fR
Whether to use colored output.
.TP
\fB--color-scheme=\fICOLOR_SCHEME\fB \fR
Colors to use in output (when color is enabled). The format for
COLOR_SCHEME is
\&':::\&'.
Numerical values and color names are accepted, empty fields imply
the default color. For example,
\fB--git-color-scheme=\fR\&'cyan:34::' would
show debug messages in cyan, info messages in blue and other messages
in default (i.e. warning and error messages in red).
.TP
\fB--[no-]patch-numbers \fR
Whether or not the patch files should be prefixed with a number.
The default is to export patches with patch numbers. Note,
however, that this normally affects patches whose names are
automatically generated, and has no effect on exporting patches
which have a \fBGbp[-Pq]: Name\fR tag, since the
name specified is preserved unless the \fB--renumber\fR
option is used.
.TP
\fB--patch-num-format=\fIformat\fB \fR
The format specifier for patch number prefixes. The default format is '%04d-'.
.TP
\fB--[no-]renumber \fR
Whether or not to renumber patches exported from the patch queue,
instead of preserving numbers specified in
\fBGbp-Pq: Name\fR tags. The default is not to renumber
patches. Useful when patches need to be renamed for the sake of
uniformity. For example, using \fB--renumber\fR with
\fB--no-patch-num\fR will strip all numeric prefixes from
exported patches.
.TP
\fB--topic=\fItopic\fB \fR
Topic to use when importing a single patch
.TP
\fB--time-machine=\fINUM\fB \fR
When importing a patch queue fails, go back commit-by-commit on the
current branch to check if the patch-queue applies there. Do this at
most \fINUM\fR times. This can be useful if the
patch-queue doesn't apply to the current branch HEAD anymore, e.g.
after importing a new upstream version.
.TP
\fB--[no-]drop\fR
Whether to automatically drop (delete) the patch queue branch after
a successful export
.TP
\fB--force\fR
In case of \fBimport\fR, import even if the
patch-queue branch already exists and overwrite its
content with \fIdebian/patches\fR\&.
.TP
\fB--meta-closes=\fIbug-close-tags\fB \fR
What meta tags to look for to generate a commit message when
using \fBexport\fR \fB--commit\fR\&.
The default is \&'Closes|LP' to support Debian and Launchpad.
.TP
\fB--meta-closes-bugnum=\fIbug-number-format\fB \fR
What regular expression should be used to parse out the
bug number when using
\fBexport\fR \fB--commit\fR\&. The
default is \&'(?:bug|issue)?\\#?\\s?\\d+'\&.
See \fBgbp-dch\fR(1)> for details.
.TP
\fB--pq-from=\fI[DEBIAN|TAG]\fB \fR
How to find the starting point for the patch queue base. The options are DEBIAN, that will use the Debian branch as the base for the patch queue branch, and TAG, that will use the corresponding upstream tag as a base for the patch queue branch.
This is only needed if your upstream branch is not merged in the Debian branch.
The default is \fIDEBIAN\fR\&.
.TP
\fB--upstream-tag=\fITAG-FORMAT\fB \fR
Use this tag format when looking for tags of upstream versions,
default is \fIupstream/%(version)s\fR\&.
.SH "TAGS"
.PP
When exporting patches from a patch-queue branch, \fBgbp\~pq\fR will look at the
patch header for special tags it recognizes. All tags need to start at the
first column and require at least one whitespace after the colon.
.TP
\fBGbp[-Pq]: Ignore \fR
Ignores the commit, no patch is generated out of it.
.TP
\fBGbp[-Pq]: Name \fIname\fB \fR
The name to use for the patch when running
.nf
\fBgbp\~pq\fR export
.fi
If unset, it will be formatted like
\fBgit am\fR would format it.
.TP
\fBGbp[-Pq]: Topic \fItopic\fB \fR
Moves the patch into a subdir called \fItopic\fR
when running
.nf
\fBgbp\~pq\fR export
.fi
This allows for some
structure below \fIdebian/patches\fR\&.
.TP
\fBGbp-Pq-Topic: \fItopic\fB \fR
Deprecated: use \fBGbp[-Pq]: Topic\fR
\fItopic\fR instead.
.SH "SEE ALSO"
.PP
\fBgbp-buildpackage\fR(1)>,
\fBdpkg-source\fR(1),
\fBquilt\fR(1),
\fBgbp.conf\fR(5)>
.SH "AUTHOR"
.PP
Guido Guenther