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):
1361
1361
def run (self , args ):
1362
1362
sync = P4Sync ()
1363
1363
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
1365
1373
oldHead = read_pipe ("git rev-parse HEAD" ).strip ()
1366
- system ("git rebase p4" )
1374
+ system ("git rebase %s" % upstream )
1367
1375
system ("git diff-tree --stat --summary -M %s HEAD" % oldHead )
1368
1376
return True
1369
1377
You can’t perform that action at this time.
0 commit comments