diff options
Diffstat (limited to 'gbp')
-rwxr-xr-x | gbp/scripts/import_srpm.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gbp/scripts/import_srpm.py b/gbp/scripts/import_srpm.py index 3ef4b110..bf661027 100755 --- a/gbp/scripts/import_srpm.py +++ b/gbp/scripts/import_srpm.py @@ -205,6 +205,9 @@ def parse_args(argv): dest="packaging_branch") branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch") + branch_group.add_option("--upstream-vcs-tag", dest="vcs_tag", + help="Upstream VCS tag on top of which to import " + "the orig sources") branch_group.add_boolean_config_file_option( option_name="create-missing-branches", dest="create_missing_branches") @@ -407,9 +410,14 @@ def main(argv): raise GbpError msg = "%s version %s" % (tag_format[1], spec.upstreamversion) + if options.vcs_tag: + parents = [repo.rev_parse("%s^{}" % options.vcs_tag)] + else: + parents = None upstream_commit = repo.commit_dir(upstream.unpacked, "Imported %s" % msg, branch, + other_parents=parents, author=author, committer=committer, create_missing_branch=options.create_missing_branches) |