@matheusbsbs / matheus-bagliano / commits / 14594f4b57
Fork 0

git-p4: After submission to p4 always synchronize from p4 again (into refs/remotes). Whether to rebase HEAD or not is still left as question to the end-user.

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

Simon Hausmann committed Aug 22, 2007 at 09:07 UTC 14594f4b5747e51b051f647f6430089e6664e77d
1 file changed +9 -2
contrib/fast-import/git-p4
+9 -2
@@ -704,10 +704,14 @@ class P4Submit(Command):
704 else:
705 print "All changes applied!"
706 os.chdir(self.oldWorkingDirectory)
707 - response = raw_input("Do you want to sync from Perforce now using git-p4 rebase? [y]es/[n]o ")
707 +
708 + sync = P4Sync()
709 + sync.run([])
710 +
711 + response = raw_input("Do you want to rebase current HEAD from Perforce now using git-p4 rebase? [y]es/[n]o ")
712 if response == "y" or response == "yes":
713 rebase = P4Rebase()
710 - rebase.run([])
714 + rebase.rebase()
715 os.remove(self.configFile)
716
717 return True
@@ -1439,6 +1443,9 @@ class P4Rebase(Command):
1443 sync = P4Sync()
1444 sync.run([])
1445
1446 + return self.rebase()
1447 +
1448 + def rebase(self):
1449 [upstream, settings] = findUpstreamBranchPoint()
1450 if len(upstream) == 0:
1451 die("Cannot find upstream branchpoint for rebase")