Show More
@@ -507,6 +507,9 b' class rebaseruntime(object):' | |||
|
507 | 507 | mergemod.mergestate.clean(repo) |
|
508 | 508 | else: |
|
509 | 509 | # Skip commit if we are collapsing |
|
510 | if self.wctx.isinmemory(): | |
|
511 | self.wctx.setbase(repo[p1]) | |
|
512 | else: | |
|
510 | 513 | repo.setparents(repo[p1].node()) |
|
511 | 514 | newnode = None |
|
512 | 515 | # Update the state |
@@ -570,7 +573,8 b' class rebaseruntime(object):' | |||
|
570 | 573 | if newwd < 0: |
|
571 | 574 | # original directory is a parent of rebase set root or ignored |
|
572 | 575 | newwd = self.originalwd |
|
573 |
if newwd not in [c.rev() for c in repo[None].parents()] |
|
|
576 | if (newwd not in [c.rev() for c in repo[None].parents()] and | |
|
577 | not self.inmemory): | |
|
574 | 578 | ui.note(_("update back to initial working directory parent\n")) |
|
575 | 579 | hg.updaterepo(repo, newwd, False) |
|
576 | 580 | |
@@ -996,6 +1000,11 b' def rebasenode(repo, rev, p1, base, stat' | |||
|
996 | 1000 | 'Rebase a single revision rev on top of p1 using base as merge ancestor' |
|
997 | 1001 | # Merge phase |
|
998 | 1002 | # Update to destination and merge it with local |
|
1003 | if wctx.isinmemory(): | |
|
1004 | wctx.setbase(repo[p1]) | |
|
1005 | else: | |
|
1006 | # This is necessary to invalidate workingctx's caches. | |
|
1007 | wctx = repo[None] | |
|
999 | 1008 | if repo['.'].rev() != p1: |
|
1000 | 1009 | repo.ui.debug(" update to %d:%s\n" % (p1, repo[p1])) |
|
1001 | 1010 | mergemod.update(repo, p1, False, True) |
@@ -1007,7 +1016,6 b' def rebasenode(repo, rev, p1, base, stat' | |||
|
1007 | 1016 | repo.ui.debug(" detach base %d:%s\n" % (base, repo[base])) |
|
1008 | 1017 | # When collapsing in-place, the parent is the common ancestor, we |
|
1009 | 1018 | # have to allow merging with it. |
|
1010 | wctx = repo[None] | |
|
1011 | 1019 | stats = mergemod.update(repo, rev, True, True, base, collapse, |
|
1012 | 1020 | labels=['dest', 'source']) |
|
1013 | 1021 | if collapse: |
General Comments 0
You need to be logged in to leave comments.
Login now