Fix the patch name checking in push.py
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 26 Jul 2005 12:54:56 +0000 (13:54 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 26 Jul 2005 12:54:56 +0000 (13:54 +0100)
For an unknown patch name, the assert in stack.py fails. Fix the calling
function to check the pre-conditions.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/push.py

index 6325483..6fbd779 100644 (file)
@@ -117,6 +117,9 @@ def func(parser, options, args):
         patches.reverse()
 
     for p in patches:
+        if p not in unapplied:
+            raise CmdException, 'Patch "%s" not unapplied' % p
+
         print 'Pushing patch "%s"...' % p,
         sys.stdout.flush()