File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1361,9 +1361,17 @@ class P4Rebase(Command):
13611361 def run (self , args ):
13621362 sync = P4Sync ()
13631363 sync .run ([])
1364- print "Rebasing the current branch"
1364+
1365+ [upstream , settings ] = findUpstreamBranchPoint ()
1366+ if len (upstream ) == 0 :
1367+ die ("Cannot find upstream branchpoint for rebase" )
1368+
1369+ # the branchpoint may be p4/foo~3, so strip off the parent
1370+ upstream = re .sub ("~[0-9]+$" , "" , upstream )
1371+
1372+ print "Rebasing the current branch onto %s" % upstream
13651373 oldHead = read_pipe ("git rev-parse HEAD" ).strip ()
1366- system ("git rebase p4" )
1374+ system ("git rebase %s" % upstream )
13671375 system ("git diff-tree --stat --summary -M %s HEAD" % oldHead )
13681376 return True
13691377
You can’t perform that action at this time.
0 commit comments