~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pipe the 'patches --diff' output through the pager
[stgit]
/
stgit
/
commands
/
rm.py
diff --git
a/stgit/commands/rm.py
b/stgit/commands/rm.py
index
9d06e9a
..
91908a1
100644
(file)
--- a/
stgit/commands/rm.py
+++ b/
stgit/commands/rm.py
@@
-25,7
+25,10
@@
from stgit import stack, git
help = 'remove files from the repository'
help = 'remove files from the repository'
-usage = '%prog [options] <files...>'
+usage = """%prog [options] <files...>
+
+Remove given files from the repository. The command doesn't remove the
+working copy of the file."""
options = [make_option('-f', '--force',
help = 'force removing even if the file exists',
options = [make_option('-f', '--force',
help = 'force removing even if the file exists',
@@
-38,4
+41,7
@@
def func(parser, options, args):
if len(args) < 1:
parser.error('incorrect number of arguments')
if len(args) < 1:
parser.error('incorrect number of arguments')
+ if not crt_series.get_current():
+ raise CmdException, 'No patches applied'
+
git.rm(args, options.force)
git.rm(args, options.force)