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
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,