X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/26aab5b04fa4ba13f48948de73e497cf0a315ad1..edf4f599dcc78b741df36bf835cc14a1e0bafedb:/stgit/commands/pop.py diff --git a/stgit/commands/pop.py b/stgit/commands/pop.py index 3da135c..64848f8 100644 --- a/stgit/commands/pop.py +++ b/stgit/commands/pop.py @@ -57,7 +57,10 @@ def func(parser, options, args): if options.to: if options.to not in applied: - raise CmdException, 'Patch "%s" not applied' % options.to + if options.to in crt_series.get_unapplied(): + raise CmdException, 'Patch "%s" is not currently applied.' % options.to + else: + raise CmdException, 'Patch "%s" does not exist.' % options.to patches = applied[:applied.index(options.to)] elif options.number: patches = applied[:options.number]