Fixes to doc strings.
[stgit] / stgit / commands / uncommit.py
index 45a2087..0ee1585 100644 (file)
@@ -25,7 +25,7 @@ from stgit.utils import *
 from stgit import stack, git
 
 help = 'turn regular GIT commits into StGIT patches'
 from stgit import stack, git
 
 help = 'turn regular GIT commits into StGIT patches'
-usage = """%prog [options] [<patchname1> [<patchname2> ... ]]
+usage = """%prog [<patchname1> [<patchname2> ... ] | -n [<prefix>]]
 
 Take one or more git commits at the base of the current stack and turn
 them into StGIT patches. The new patches are created as applied patches
 
 Take one or more git commits at the base of the current stack and turn
 them into StGIT patches. The new patches are created as applied patches
@@ -97,9 +97,8 @@ def func(parser, options, args):
         if patchnames:
             patchname = patchnames[n]
         else:
         if patchnames:
             patchname = patchnames[n]
         else:
-            patchname = make_patch_name(commit.get_log())
-        if not patchname:
-            raise CmdException, 'Unknown patch name for commit %s' % commit_id
+            patchname = make_patch_name(commit.get_log(),
+                                        crt_series.patch_exists)
 
         crt_series.new_patch(patchname,
                              can_edit = False, before_existing = True,
 
         crt_series.new_patch(patchname,
                              can_edit = False, before_existing = True,