@matheusbsbs / matheus-bagliano / commits / 80b5910fac
Fork 0

Allow for convenient rebasing after git-p4 submit

Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed Apr 9, 2007 at 12:43 UTC 80b5910fac79b22ccc8eabb2262562c913d5603c
1 file changed +6
contrib/fast-import/git-p4
+6
@@ -352,6 +352,7 @@ class P4Submit(Command):
352 sys.exit(128)
353
354 print "Perforce checkout for depot path %s located at %s" % (depotPath, clientPath)
355 + oldWorkingDirectory = os.getcwd()
356 os.chdir(clientPath)
357 response = raw_input("Do you want to sync %s with p4 sync? (y/n) " % clientPath)
358 if response == "y" or response == "yes":
@@ -403,6 +404,11 @@ class P4Submit(Command):
404 print "Cleaning out your perforce checkout by doing p4 edit ... ; p4 revert ..."
405 system("p4 edit ... >/dev/null")
406 system("p4 revert ... >/dev/null")
407 + response = raw_input("Do you want to sync from Perforce now using git-p4 rebase (y/n)? ")
408 + if response == "y" or response == "yes":
409 + os.chdir(oldWorkingDirectory)
410 + rebase = P4Rebase()
411 + rebase.run([])
412 os.remove(self.configFile)
413
414 return True