X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fcee87cf868f18a3d684c3ba71232574f92c7b11..6dd8fafabb5b8e266a85f13c8851ca8a66a1a405:/stgit/commands/rm.py diff --git a/stgit/commands/rm.py b/stgit/commands/rm.py index 9d06e9a..59d098b 100644 --- a/stgit/commands/rm.py +++ b/stgit/commands/rm.py @@ -25,8 +25,12 @@ from stgit import stack, git help = 'remove files from the repository' -usage = '%prog [options] ' +usage = """%prog [options] +Remove given files from the repository. The command doesn't remove the +working copy of the file.""" + +directory = DirectoryHasRepository() options = [make_option('-f', '--force', help = 'force removing even if the file exists', action = 'store_true')] @@ -38,4 +42,7 @@ def func(parser, options, args): 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)