OSDN Git Service

Catch p4 errors in rollback early enough (before deleting refs!)
authorSimon Hausmann <shausman@trolltech.com>
Wed, 23 May 2007 21:40:48 +0000 (23:40 +0200)
committerSimon Hausmann <shausman@trolltech.com>
Wed, 23 May 2007 21:40:48 +0000 (23:40 +0200)
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
contrib/fast-import/git-p4

index 6ae3bc6..6d016b8 100755 (executable)
@@ -152,6 +152,9 @@ class P4RollBack(Command):
             return False
         maxChange = int(args[0])
 
+        if "p4ExitCode" in p4Cmd("p4 changes -m 1"):
+            die("Problems executing p4");
+
         if self.rollbackLocalBranches:
             refPrefix = "refs/heads/"
             lines = mypopen("git rev-parse --symbolic --branches").readlines()