##// END OF EJS Templates
rebase: allow in-memory merge of the working copy parent...
Martin von Zweigbergk -
r36993:795eb53f default
parent child Browse files
Show More
@@ -599,8 +599,7 b' class rebaseruntime(object):'
599 599 if newwd < 0:
600 600 # original directory is a parent of rebase set root or ignored
601 601 newwd = self.originalwd
602 if (newwd not in [c.rev() for c in repo[None].parents()] and
603 not self.inmemory):
602 if newwd not in [c.rev() for c in repo[None].parents()]:
604 603 ui.note(_("update back to initial working directory parent\n"))
605 604 hg.updaterepo(repo, newwd, False)
606 605
@@ -957,20 +956,10 b' def _definedestmap(ui, repo, rbsrt, dest'
957 956 ui.status(_('nothing to rebase from %s to %s\n') %
958 957 ('+'.join(bytes(repo[r]) for r in base), dest))
959 958 return None
960 # If rebasing the working copy parent, force in-memory merge to be off.
961 #
962 # This is because the extra work of checking out the newly rebased commit
963 # outweights the benefits of rebasing in-memory, and executing an extra
964 # update command adds a bit of overhead, so better to just do it on disk. In
965 # all other cases leave it on.
966 #
967 # Note that there are cases where this isn't true -- e.g., rebasing large
968 # stacks that include the WCP. However, I'm not yet sure where the cutoff
969 # is.
959
970 960 rebasingwcp = repo['.'].rev() in rebaseset
971 961 ui.log("rebase", "", rebase_rebasing_wcp=rebasingwcp)
972 962 if rbsrt.inmemory and rebasingwcp:
973 rbsrt.inmemory = False
974 963 # Check these since we did not before.
975 964 cmdutil.checkunfinished(repo)
976 965 cmdutil.bailifchanged(repo)
@@ -140,12 +140,11 b' Ensure symlink and executable files were'
140 140 $ ls -l f | cut -c -10
141 141 -rwxr-xr-x
142 142
143 Rebase the working copy parent, which should default to an on-disk merge even if
144 we requested in-memory.
143 Rebase the working copy parent
145 144 $ hg up -C 3
146 145 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 146 $ hg rebase -r 3 -d 0 --debug | grep rebasing
148 rebasing on disk
147 rebasing in-memory
149 148 rebasing 3:753feb6fd12a "c" (tip)
150 149 $ hg tglog
151 150 @ 3: 844a7de3e617 'c'
General Comments 0
You need to be logged in to leave comments. Login now