summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-11-07 15:07:18 +0100
committerGuido Günther <agx@sigxcpu.org>2009-11-07 15:25:55 +0100
commit9d190a5be998d58bb61f00444b5689880704358c (patch)
treee7ac19f2359a111608e5ab67324e7035b6a90b0f /examples
parent3bf8288c2563bfe83427c18bb10317f1dc42515e (diff)
downloadgit-buildpackage-9d190a5be998d58bb61f00444b5689880704358c.tar.gz
git-buildpackage-9d190a5be998d58bb61f00444b5689880704358c.tar.bz2
git-buildpackage-9d190a5be998d58bb61f00444b5689880704358c.zip
add --redo-pq
so a "gbp-pull --redo-pq" also refreshes the patch-queue branch
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/gbp-pull7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/gbp-pull b/examples/gbp-pull
index ed79077b..fa7fbdf3 100755
--- a/examples/gbp-pull
+++ b/examples/gbp-pull
@@ -54,6 +54,8 @@ def main(argv):
branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
parser.add_option("--force", action="store_true", dest="force", default=False,
help="force update even if not fast forward")
+ parser.add_option("--redo-pq", action="store_true", dest="redo_pq", default=False,
+ help="Redo the patch queue branch after a pull. Warning: this drops the old patch-queue branch")
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
help="verbose command execution")
@@ -89,6 +91,11 @@ def main(argv):
for branch in branches:
fast_forward_branch(branch, repo, options)
+ if options.redo_pq:
+ repo.set_branch(options.debian_branch)
+ Command("gbp-pq")(["drop"])
+ Command("gbp-pq")(["import"])
+
repo.set_branch(current)
except CommandExecFailed:
retval = 1