import: enable --upstream-vcs-tag option for src.rpms
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 3 Jun 2013 09:35:25 +0000 (12:35 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 3 Jun 2013 09:35:25 +0000 (12:35 +0300)
As this option was recently added into git-import-srpm.

Change-Id: Iaba0f33c58326a5f3a3d2781d996c7f3a52f6816
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gitbuildsys/cmd_import.py
tools/gbs

index 8676e7ae57ecf23e136f94de1f693ca2dd9708cb..efd8e88e07329f10210396bcad1c89215df08028 100644 (file)
@@ -60,6 +60,8 @@ def main(args):
         params.append("--pristine-tar")
     if args.filter:
         params += [('--filter=%s' % f) for f in args.filter]
+    if args.upstream_vcs_tag:
+        params.append('--upstream-vcs-tag=%s' % args.upstream_vcs_tag)
 
     if path.endswith('.src.rpm') or path.endswith('.spec'):
         if args.allow_same_version:
@@ -77,8 +79,6 @@ def main(args):
         elif ret:
             raise GbsError("Failed to import %s" % path)
     else:
-        if args.upstream_vcs_tag:
-            params.append('--upstream-vcs-tag=%s' % args.upstream_vcs_tag)
         if args.merge:
             params.append('--merge')
         else:
index 823c292471d3830dc8571bec9167d2baed7ea546..dd093eaa94b0863c30245db4b9d48b6057304939 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -46,6 +46,9 @@ def import_parser(parser):
     parser.add_argument('--author-email', help='author email of git commit')
     parser.add_argument('--upstream-branch',
                         help='specify upstream branch for new package version')
+    parser.add_argument('--upstream-vcs-tag',
+                        help='upstream VCS tag on top of which to import the '
+                             'orig sources')
     parser.add_argument('--packaging-dir',
                         help='directory containing packaging files')
     parser.add_argument('--no-pristine-tar', action='store_true',
@@ -69,8 +72,6 @@ def import_parser(parser):
                         'options')
     group.add_argument('--merge', action='store_true',
                          help='merge new upstream branch to master')
-    group.add_argument('--upstream-vcs-tag',
-                        help='upstream VCS tag add to the merge commit')
 
     parser.set_defaults(alias="im")
     return parser