Check whether the patch name is applied or unapplied
authorCatalin Marinas <catalin.marinas@gmail.com>
Sat, 17 Sep 2005 08:12:26 +0000 (09:12 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Sat, 17 Sep 2005 08:12:26 +0000 (09:12 +0100)
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/push.py

index eeb37c4..a4b507e 100644 (file)
@@ -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')