Add the --patch option to export
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 16 Mar 2006 20:08:15 +0000 (20:08 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 16 Mar 2006 20:08:34 +0000 (20:08 +0000)
This option appends the .patch extension to the generated patch names.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/export.py

index 4ea0236..549145e 100644 (file)
@@ -54,6 +54,9 @@ options = [make_option('-n', '--numbered',
            make_option('-d', '--diff',
                        help = 'append .diff to the patch names',
                        action = 'store_true'),
+           make_option('-p', '--patch',
+                       help = 'append .patch to the patch names',
+                       action = 'store_true'),
            make_option('-t', '--template', metavar = 'FILE',
                        help = 'Use FILE as a template'),
            make_option('-r', '--range',
@@ -160,6 +163,8 @@ def func(parser, options, args):
         pname = p
         if options.diff:
             pname = '%s.diff' % pname
+        elif options.patch:
+            pname = '%s.patch' % pname
         if options.numbered:
             pname = '%s-%s' % (str(patch_no).zfill(zpadding), pname)
         pfile = os.path.join(dirname, pname)