import_dsc: Support upstream-vcs-tag
authorGuido Günther <agx@sigxcpu.org>
Fri, 26 Apr 2019 11:44:27 +0000 (13:44 +0200)
committerGuido Günther <agx@sigxcpu.org>
Fri, 26 Apr 2019 11:47:33 +0000 (13:47 +0200)
Closes: #782886
gbp/scripts/import_dsc.py

index e7b89a652c2ccc71ef42729b6ae6e13c984f272e..7d6e4919186a2c0763271b5ceccbcf3e807900f2 100644 (file)
@@ -252,9 +252,12 @@ def import_upstream(repo, source, dsc, options):
     author = committer = {}
     commit_msg = "Import %s" % msg
 
+    upstream_parent = repo.vcs_tag_parent(options.vcs_tag,
+                                          dsc.upstream_version)
     commit = repo.commit_dir(source.unpacked,
                              commit_msg,
                              branch,
+                             other_parents=upstream_parent,
                              author=author,
                              committer=committer)
 
@@ -335,6 +338,7 @@ def build_parser(name):
                                         dest="upstream_branch")
     branch_group.add_boolean_config_file_option(option_name="create-missing-branches",
                                                 dest="create_missing_branches")
+    branch_group.add_config_file_option(option_name="upstream-vcs-tag", dest="vcs_tag")
 
     tag_group.add_boolean_config_file_option(option_name="sign-tags",
                                              dest="sign_tags")