Mercurial > hg
comparison tests/test-rebase-inmemory.t @ 36975:795eb53f1d3e
rebase: allow in-memory merge of the working copy parent
Before this patch and when the rebase involved the working copy parent
(and thus the working copy too), we would not do in-memory rebase even
if requested to. The in-code comment explains that the reason had
something to do with avoiding an extra update, but I don't know which
update that refers to. Perhaps an earlier version of the code used to
update to the destination before rebasing even if in-memory rebase was
requested? That seems to not be done at least since aa660c1203a9
(rebase: do not bail on uncomitted changes if rebasing in-memory,
2017-12-07).
To see if this still made it slower, I create a single tiny commit on
top of one branch of the mozilla-unified repo (commit a1098c82 to be
exact) and rebased it to another branch (commit d4e9a7be). Before this
patch that took 11.8s and after this patch it took 8.6s (I only did
two runs each, but the timings were very consistent).
Differential Revision: https://phab.mercurial-scm.org/D2876
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Mar 2018 13:19:55 -0700 |
parents | dd11df900f7f |
children | f4f1fb1cbfb4 |
comparison
equal
deleted
inserted
replaced
36974:435b8b05affd | 36975:795eb53f1d3e |
---|---|
138 $ readlink.py e | 138 $ readlink.py e |
139 e -> somefile | 139 e -> somefile |
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' |
152 | | 151 | |
153 | o 2: 09c044d2cb43 'd' | 152 | o 2: 09c044d2cb43 'd' |