##// 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 if newwd < 0:
599 if newwd < 0:
600 # original directory is a parent of rebase set root or ignored
600 # original directory is a parent of rebase set root or ignored
601 newwd = self.originalwd
601 newwd = self.originalwd
602 if (newwd not in [c.rev() for c in repo[None].parents()] and
602 if newwd not in [c.rev() for c in repo[None].parents()]:
603 not self.inmemory):
604 ui.note(_("update back to initial working directory parent\n"))
603 ui.note(_("update back to initial working directory parent\n"))
605 hg.updaterepo(repo, newwd, False)
604 hg.updaterepo(repo, newwd, False)
606
605
@@ -957,20 +956,10 b' def _definedestmap(ui, repo, rbsrt, dest'
957 ui.status(_('nothing to rebase from %s to %s\n') %
956 ui.status(_('nothing to rebase from %s to %s\n') %
958 ('+'.join(bytes(repo[r]) for r in base), dest))
957 ('+'.join(bytes(repo[r]) for r in base), dest))
959 return None
958 return None
960 # If rebasing the working copy parent, force in-memory merge to be off.
959
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.
970 rebasingwcp = repo['.'].rev() in rebaseset
960 rebasingwcp = repo['.'].rev() in rebaseset
971 ui.log("rebase", "", rebase_rebasing_wcp=rebasingwcp)
961 ui.log("rebase", "", rebase_rebasing_wcp=rebasingwcp)
972 if rbsrt.inmemory and rebasingwcp:
962 if rbsrt.inmemory and rebasingwcp:
973 rbsrt.inmemory = False
974 # Check these since we did not before.
963 # Check these since we did not before.
975 cmdutil.checkunfinished(repo)
964 cmdutil.checkunfinished(repo)
976 cmdutil.bailifchanged(repo)
965 cmdutil.bailifchanged(repo)
@@ -140,12 +140,11 b' Ensure symlink and executable files were'
140 $ ls -l f | cut -c -10
140 $ ls -l f | cut -c -10
141 -rwxr-xr-x
141 -rwxr-xr-x
142
142
143 Rebase the working copy parent, which should default to an on-disk merge even if
143 Rebase the working copy parent
144 we requested in-memory.
145 $ hg up -C 3
144 $ hg up -C 3
146 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 $ hg rebase -r 3 -d 0 --debug | grep rebasing
146 $ hg rebase -r 3 -d 0 --debug | grep rebasing
148 rebasing on disk
147 rebasing in-memory
149 rebasing 3:753feb6fd12a "c" (tip)
148 rebasing 3:753feb6fd12a "c" (tip)
150 $ hg tglog
149 $ hg tglog
151 @ 3: 844a7de3e617 'c'
150 @ 3: 844a7de3e617 'c'
General Comments 0
You need to be logged in to leave comments. Login now