Skip to content

Commit

Permalink
git-p4: After submission to p4 always synchronize from p4 again (into…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Simon Hausmann committed Sep 3, 2007
1 parent 31f9ec1 commit 14594f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,14 @@ class P4Submit(Command):
else:
print "All changes applied!"
os.chdir(self.oldWorkingDirectory)
response = raw_input("Do you want to sync from Perforce now using git-p4 rebase? [y]es/[n]o ")

sync = P4Sync()
sync.run([])

response = raw_input("Do you want to rebase current HEAD from Perforce now using git-p4 rebase? [y]es/[n]o ")
if response == "y" or response == "yes":
rebase = P4Rebase()
rebase.run([])
rebase.rebase()
os.remove(self.configFile)

return True
Expand Down Expand Up @@ -1439,6 +1443,9 @@ class P4Rebase(Command):
sync = P4Sync()
sync.run([])

return self.rebase()

def rebase(self):
[upstream, settings] = findUpstreamBranchPoint()
if len(upstream) == 0:
die("Cannot find upstream branchpoint for rebase")
Expand Down

0 comments on commit 14594f4

Please sign in to comment.