~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the 'autobcc' config option
[stgit]
/
stgit
/
commands
/
delete.py
diff --git
a/stgit/commands/delete.py
b/stgit/commands/delete.py
index
a003082
..
c97d8ed
100644
(file)
--- a/
stgit/commands/delete.py
+++ b/
stgit/commands/delete.py
@@
-25,10
+25,15
@@
from stgit import stack, git
help = 'remove the topmost or any unapplied patch'
help = 'remove the topmost or any unapplied patch'
-usage =
'%prog <name>'
+usage =
"""%prog [options] <patch>
-options = []
+Delete the patch passed as argument. The patch to be deleted can only
+be part of the unapplied list or be the topmost one, in the latter
+case the command also popping it from the stack. Note that the
+'delete' operation is irreversible."""
+options = [make_option('-b', '--branch',
+ help = 'use BRANCH instead of the default one')]
def func(parser, options, args):
"""Deletes a patch
def func(parser, options, args):
"""Deletes a patch
@@
-43,4
+48,6
@@
def func(parser, options, args):
crt_series.delete_patch(args[0])
print 'Patch "%s" successfully deleted' % args[0]
crt_series.delete_patch(args[0])
print 'Patch "%s" successfully deleted' % args[0]
- print_crt_patch()
+
+ if not options.branch:
+ print_crt_patch()