From ee4447920b41cad774f1494c0e2b2312ca3a5a9a Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 12 Sep 2014 13:05:47 +0200 Subject: Allow to always drop pq branch after export Closes: #761160 --- gbp/config.py | 4 ++++ gbp/scripts/pq.py | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'gbp') diff --git a/gbp/config.py b/gbp/config.py index e0cd779a..0580cc51 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -155,6 +155,7 @@ class GbpOptionParser(OptionParser): 'allow-unauthenticated': 'False', 'symlink-orig': 'True', 'purge': 'True', + 'drop': 'False', } help = { 'debian-branch': @@ -294,6 +295,9 @@ class GbpOptionParser(OptionParser): "'%(symlink-orig)s'"), 'purge': "Purge exported package build directory. Default is '%(purge)s'", + 'drop': + ("In case of 'export' drop the patch-queue branch " + "after export. Default is '%(drop)s'"), } def_config_files = [ '/etc/git-buildpackage/gbp.conf', diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py index 3186de5b..80520d49 100755 --- a/gbp/scripts/pq.py +++ b/gbp/scripts/pq.py @@ -94,6 +94,9 @@ def export_patches(repo, branch, options): else: gbp.log.info("No patches on '%s' - nothing to do." % pq_branch) + if options.drop: + drop_pq(repo, branch) + def safe_patches(series): """ @@ -234,6 +237,7 @@ def build_parser(name): help="verbose command execution") parser.add_option("--topic", dest="topic", help="in case of 'apply' topic (subdir) to put patch into") parser.add_config_file_option(option_name="time-machine", dest="time_machine", type="int") + parser.add_boolean_config_file_option("drop", dest='drop') parser.add_option("--force", dest="force", action="store_true", default=False, help="in case of import even import if the branch already exists") parser.add_config_file_option(option_name="color", dest="color", type='tristate') -- cgit v1.2.3