From e2739d24252ea3651deba9fd6ff1ec9f6f86a245 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 30 May 2013 17:35:57 +0300 Subject: import-srpm: support --upstream-vcs-tag cmdline option Similar to what the option does in git-import-orig-[rpm]. Signed-off-by: Markus Lehtonen --- gbp/scripts/import_srpm.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gbp/scripts/import_srpm.py') 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) -- cgit v1.2.3