summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-05-11 11:29:24 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:04 +0300
commit55c42219e10be5cc08cf0f35e770a45a3bff4d09 (patch)
tree44cf17a895979ea7cbf7bb1d5f53f82894cc6b66
parentb0f31c9d48e5356edb20afdd9b87764286f5a1f7 (diff)
downloadgit-buildpackage-55c42219e10be5cc08cf0f35e770a45a3bff4d09.tar.gz
git-buildpackage-55c42219e10be5cc08cf0f35e770a45a3bff4d09.tar.bz2
git-buildpackage-55c42219e10be5cc08cf0f35e770a45a3bff4d09.zip
pq-rpm: add new --pq-branch option
Adds a new command line option '--pq-branch' to set the name of patch-queue branches. Changes the defaults pq-branch name for rpm tools to 'development/%(branch)s' (instead of the old 'patch-queue/%(branch)s'). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--gbp/config.py3
-rwxr-xr-xgbp/scripts/pq_rpm.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 50568a38..ca64b620 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -581,6 +581,7 @@ class GbpOptionParserRpm(GbpOptionParser):
'cleaner' : '',
'packaging-dir' : '',
'packaging-tag' : 'packaging/%(version)s',
+ 'pq-branch' : 'development/%(branch)s',
'spec-file' : 'auto',
} )
@@ -590,6 +591,8 @@ class GbpOptionParserRpm(GbpOptionParser):
"subdir where packaging files are stored, default is '%(packaging-dir)s'",
'packaging-tag':
"format string for packaging tags, rpm counterpart of the 'debian-tag' option, default is '%(packaging-tag)s'",
+ 'pq-branch':
+ "format string for the patch-queue branch name, default is '%(pq-branch)s'",
'spec-file':
"Spec file to use, 'auto' makes gbp to guess, other values make the packaging-dir option to be ignored, default is '%(spec-file)s'",
} )
diff --git a/gbp/scripts/pq_rpm.py b/gbp/scripts/pq_rpm.py
index e1fda713..267357be 100755
--- a/gbp/scripts/pq_rpm.py
+++ b/gbp/scripts/pq_rpm.py
@@ -279,7 +279,7 @@ def rebase_pq(repo, branch, options):
if not upstream_commit:
raise GbpError, ("Couldn't find upstream version %s. Don't know on what base to import." % spec.version)
- switch_to_pq_branch(repo, branch)
+ switch_to_pq_branch(repo, branch, options)
GitCommand("rebase")([upstream_commit])
@@ -323,6 +323,10 @@ def main(argv):
parser.add_config_file_option(option_name="upstream-tag", dest="upstream_tag")
parser.add_config_file_option(option_name="spec-file", dest="spec_file")
parser.add_config_file_option(option_name="packaging-dir", dest="packaging_dir")
+ parser.add_config_file_option(option_name="packaging-branch",
+ dest="packaging_branch",
+ help="Branch the packaging is being maintained on. Only relevant if a invariable/single pq-branch is defined, in which case this is used as the 'base' branch. Default is '%(packaging-branch)s'")
+ parser.add_config_file_option(option_name="pq-branch", dest="pq_branch")
parser.add_option("--export-rev", action="store", dest="export_rev", default="",
help="Export patches from treeish object TREEISH instead "
"of head of patch-queue branch", metavar="TREEISH")