summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2015-03-16 19:11:09 +0100
committerGuido Günther <agx@sigxcpu.org>2015-03-16 19:18:44 +0100
commit83c5cc5a8556527863ffd0972244e33869d47f4b (patch)
tree9e1bcddf66c2e9aa80c213257b5655521dea8288
parente4f767f7c9a2c4a2f01d0345820bf7b500a1f834 (diff)
Allow to set upstream-vcs-tag via gbp.conf
Also pass it through version_to_tag so upstream-vcs-tag = libgpg-error-%(version)s properly expands the version replacement. Closes: #780602
-rw-r--r--gbp/config.py1
-rw-r--r--gbp/scripts/import_orig.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/gbp/config.py b/gbp/config.py
index dd8905d..9f8e7fc 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -160,6 +160,7 @@ class GbpOptionParser(OptionParser):
'purge': 'True',
'drop': 'False',
'commit': 'False',
+ 'upstream-vcs-tag': '',
}
help = {
'debian-branch':
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index 3840053..d7ad7b4 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -208,7 +208,7 @@ def build_parser(name):
dest="debian_branch")
branch_group.add_config_file_option(option_name="upstream-branch",
dest="upstream_branch")
- branch_group.add_option("--upstream-vcs-tag", dest="vcs_tag",
+ branch_group.add_config_file_option(option_name="upstream-vcs-tag", dest="vcs_tag",
help="Upstream VCS tag add to the merge commit")
branch_group.add_boolean_config_file_option(option_name="merge", dest="merge")
@@ -357,7 +357,7 @@ def main(argv):
msg = upstream_import_commit_msg(options, version)
if options.vcs_tag:
- parents = [repo.rev_parse("%s^{}" % options.vcs_tag)]
+ parents = [repo.rev_parse("%s^{}" % repo.version_to_tag(options.vcs_tag, version))]
else:
parents = None