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