Mercurial > evolve
comparison tests/test-evolve-noupdate.t @ 5777:c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
This patch adds a config option to let run evolve's relocation step
using in-memory merge. It is disabled by default. When the option is
on, the relocation is first attempted in memory. If that fails because
of merge conflicts, it retries that commit in the working copy.
There are a few reasons that I made it configurable. The most
important one is that the precommit hook won't trigger when using
in-memory merge. Another reason is that it lets us roll out the
feature slowly to our users at Google.
For now, we also update the working copy after creating the commit (in the
successful case, when there are no merge conflicts). The next patch will make it
so we don't do that update.
Because of the unnecessary working-copy update, this patch doesn't
provide any benefit on its own. Evolving 29 commits that each change
one line in the hg slows down from ~4.5s to ~4.8s when the config
option is on.
I've added `#testcases inmemory ondisk` to select `.t` files. Almost
all differences are because of the new "hit merge conflicts" message
and retrying the merge. There's also one difference in
`test-stabilize-order.t` caused by the different order of working copy
updates (we now update the working copy at the end).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Oct 2020 15:40:36 -0700 |
parents | bcd52ce0916d |
children | 29bc269bcc96 |
comparison
equal
deleted
inserted
replaced
5776:453ba695c3d4 | 5777:c5dfbbe4363d |
---|---|
15 > [alias] | 15 > [alias] |
16 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" | 16 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" |
17 > [extensions] | 17 > [extensions] |
18 > EOF | 18 > EOF |
19 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH | 19 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
20 | |
21 #testcases inmemory ondisk | |
22 #if inmemory | |
23 $ cat >> $HGRCPATH <<EOF | |
24 > [experimental] | |
25 > evolution.in-memory = yes | |
26 > EOF | |
27 #endif | |
20 | 28 |
21 $ hg init stoprepo | 29 $ hg init stoprepo |
22 $ cd stoprepo | 30 $ cd stoprepo |
23 $ echo ".*\.orig" > .hgignore | 31 $ echo ".*\.orig" > .hgignore |
24 $ hg add .hgignore | 32 $ hg add .hgignore |