diff options
author | Simon Hausmann <simon@lst.de> | 2007-04-09 12:43:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-04-09 12:43:40 +0200 |
commit | 80b5910fac79b22ccc8eabb2262562c913d5603c (patch) | |
tree | c55517b82a08ab7ec1185bda4a4e83ef92ad8b27 | |
parent | Added a simple example of usage to the "documentation" :) (diff) | |
download | tgif-80b5910fac79b22ccc8eabb2262562c913d5603c.tar.xz |
Allow for convenient rebasing after git-p4 submit
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-x | contrib/fast-import/git-p4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 72fa48af04..4fbfaf11b6 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -352,6 +352,7 @@ class P4Submit(Command): sys.exit(128) print "Perforce checkout for depot path %s located at %s" % (depotPath, clientPath) + oldWorkingDirectory = os.getcwd() os.chdir(clientPath) response = raw_input("Do you want to sync %s with p4 sync? (y/n) " % clientPath) if response == "y" or response == "yes": @@ -403,6 +404,11 @@ class P4Submit(Command): print "Cleaning out your perforce checkout by doing p4 edit ... ; p4 revert ..." system("p4 edit ... >/dev/null") system("p4 revert ... >/dev/null") + response = raw_input("Do you want to sync from Perforce now using git-p4 rebase (y/n)? ") + if response == "y" or response == "yes": + os.chdir(oldWorkingDirectory) + rebase = P4Rebase() + rebase.run([]) os.remove(self.configFile) return True |