From b70e43eb58252ac85081a146ec2ee43861d7af60 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Sat, 17 Sep 2005 09:12:26 +0100 Subject: [PATCH] Check whether the patch name is applied or unapplied Signed-off-by: Catalin Marinas --- stgit/commands/push.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stgit/commands/push.py b/stgit/commands/push.py index eeb37c4..a4b507e 100644 --- a/stgit/commands/push.py +++ b/stgit/commands/push.py @@ -108,7 +108,9 @@ def func(parser, options, args): elif len(args) == 0: patches = [unapplied[0]] elif len(args) == 1: - patches = [args[0]] + patches = args + if patches[0] not in unapplied: + raise CmdException, 'Patch "%s" not unapplied' % patches[0] else: parser.error('incorrect number of arguments') -- 2.11.0