Show More
@@ -1224,7 +1224,12 b' def buildstate(repo, dest, rebaseset, co' | |||||
1224 | if commonbase == root: |
|
1224 | if commonbase == root: | |
1225 | raise error.Abort(_('source is ancestor of destination')) |
|
1225 | raise error.Abort(_('source is ancestor of destination')) | |
1226 | if commonbase == dest: |
|
1226 | if commonbase == dest: | |
1227 | samebranch = root.branch() == dest.branch() |
|
1227 | wctx = repo[None] | |
|
1228 | if dest == wctx.p1(): | |||
|
1229 | # when rebasing to '.', it will use the current wd branch name | |||
|
1230 | samebranch = root.branch() == wctx.branch() | |||
|
1231 | else: | |||
|
1232 | samebranch = root.branch() == dest.branch() | |||
1228 | if not collapse and samebranch and root in dest.children(): |
|
1233 | if not collapse and samebranch and root in dest.children(): | |
1229 | repo.ui.debug('source is a child of destination\n') |
|
1234 | repo.ui.debug('source is a child of destination\n') | |
1230 | return None |
|
1235 | return None |
@@ -387,4 +387,23 b" rebase 'c1' to the branch head 'c2' that" | |||||
387 | o 0: '0' |
|
387 | o 0: '0' | |
388 |
|
388 | |||
389 |
|
389 | |||
|
390 | $ hg up -cr 1 | |||
|
391 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
392 | $ hg branch x | |||
|
393 | marked working directory as branch x | |||
|
394 | $ hg rebase -r 3:: -d . | |||
|
395 | rebasing 3:76abc1c6f8c7 "b1" | |||
|
396 | rebasing 4:8427af5d86f2 "c2 closed" (tip) | |||
|
397 | note: rebase of 4:8427af5d86f2 created no changes to commit | |||
|
398 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/76abc1c6f8c7-cd698d13-backup.hg (glob) | |||
|
399 | $ hg tglog | |||
|
400 | o 3: 'b1' x | |||
|
401 | | | |||
|
402 | | o 2: 'c1' c | |||
|
403 | | | | |||
|
404 | @ | 1: 'b2' b | |||
|
405 | |/ | |||
|
406 | o 0: '0' | |||
|
407 | ||||
|
408 | ||||
390 | $ cd .. |
|
409 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now