Code

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 6ae3bc6e5db86babbc1b8d68a66f28252881ba07..6d016b83d4b72f3ff1e2281d1365e0ab3aaa1ab7 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()