diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-05-30 17:35:57 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-05 14:20:07 +0300 |
commit | e2739d24252ea3651deba9fd6ff1ec9f6f86a245 (patch) | |
tree | 15d21323c047a047ed07eefbd15d384a58afc06a /gbp/scripts/import_srpm.py | |
parent | 757ab802648d5f5b5ca81fb2695a80c8dd15927e (diff) | |
download | git-buildpackage-e2739d24252ea3651deba9fd6ff1ec9f6f86a245.tar.gz git-buildpackage-e2739d24252ea3651deba9fd6ff1ec9f6f86a245.tar.bz2 git-buildpackage-e2739d24252ea3651deba9fd6ff1ec9f6f86a245.zip |
import-srpm: support --upstream-vcs-tag cmdline option
Similar to what the option does in git-import-orig-[rpm].
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/scripts/import_srpm.py')
-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) |