import: invert the --no-merge option to --merge
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 27 Nov 2012 14:32:44 +0000 (16:32 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 27 Nov 2012 14:40:43 +0000 (16:40 +0200)
Not-merging should be the default as merging upstream to master very
easily breaks the patch generation. Moreover, using gbs import to import
tarballs creates the 'upstream' branch which enables patch-generation.
Thus, the gbs toolset currently supports a haphazard/broken workflow.

Merging only fits in the "one-big-tarball" maintenance model, do it only
if user really requests it.

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

index 181faf1..95a841c 100644 (file)
@@ -53,8 +53,10 @@ def main(args):
         elif ret:
             msger.error("Failed to import %s" % path)
     else:
-        if args.no_merge:
-            params.insert(1, '--no-merge')
+        if args.merge:
+            params.append('--merge')
+        else:
+            params.append('--no-merge')
         if gbp_import_orig(params):
             msger.error('Failed to import %s' % path)
 
index 5c9d608..ff87077 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -44,8 +44,8 @@ def import_parser(parser):
     parser.add_argument('--author-email', help='author email of git commit')
     parser.add_argument('--upstream_branch', default='upstream',
                         help='specify upstream branch for new package version')
-    parser.add_argument('--no-merge', action='store_true',
-                         help='don\'t merge new upstream branch to master')
+    parser.add_argument('--merge', action='store_true',
+                         help='merge new upstream branch to master')
     parser.add_argument('--packaging-dir',
                         help='directory containing packaging files')
     parser.add_argument('--no-pristine-tar', action='store_true',