Skip to content

Commit 14594f4

Browse files
committed
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>
1 parent 31f9ec1 commit 14594f4

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

contrib/fast-import/git-p4

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,14 @@ class P4Submit(Command):
704704
else:
705705
print "All changes applied!"
706706
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 ")
708712
if response == "y" or response == "yes":
709713
rebase = P4Rebase()
710-
rebase.run([])
714+
rebase.rebase()
711715
os.remove(self.configFile)
712716

713717
return True
@@ -1439,6 +1443,9 @@ class P4Rebase(Command):
14391443
sync = P4Sync()
14401444
sync.run([])
14411445

1446+
return self.rebase()
1447+
1448+
def rebase(self):
14421449
[upstream, settings] = findUpstreamBranchPoint()
14431450
if len(upstream) == 0:
14441451
die("Cannot find upstream branchpoint for rebase")

0 commit comments

Comments
 (0)