Mercurial > evolve
annotate tests/test-evolve-inmemory.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 | 453ba695c3d4 |
children | 84affb254cdf |
rev | line source |
---|---|
5776
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
1 Tests running `hg evolve` with in-memory merge. |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
3 $ . $TESTDIR/testlib/common.sh |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
4 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
5 $ cat >> $HGRCPATH <<EOF |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
6 > [extensions] |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
7 > evolve = |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
8 > drawdag=$RUNTESTDIR/drawdag.py |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
9 > [alias] |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
10 > glog = log -G -T '{rev}:{node|short} {separate(" ", phase, tags)}\n{desc|firstline}' |
5777
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
11 > [experimental] |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
12 > evolution.in-memory = yes |
5776
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
13 > EOF |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
14 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
15 Test evolving a single orphan |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
16 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
17 $ hg init single-orphan |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
18 $ cd single-orphan |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
19 $ hg debugdrawdag <<'EOS' |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
20 > C # C/c = c\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
21 > B2 | # B2/b = b2\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
22 > | B # B/b = b\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
23 > \ / # replace: B -> B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
24 > A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
25 > EOS |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
26 1 new orphan changesets |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
27 $ hg evolve |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
28 move:[3] C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
29 atop:[2] B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
30 $ hg glog |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
31 o 4:52da76e91abb draft tip |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
32 | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
33 | x 3:bc77848cde3a draft C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
34 | | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
35 o | 2:377a194b9b8a draft B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
36 | | B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
37 | x 1:830b6315076c draft B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
38 |/ B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
39 o 0:426bada5c675 draft A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
40 A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
41 $ hg cat -r tip b c |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
42 b2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
43 c |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
44 $ cd .. |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
45 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
46 Test that in-memory evolve works when there are conflicts |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
47 and after continuing. |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
48 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
49 $ hg init conflicts |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
50 $ cd conflicts |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 $ hg debugdrawdag <<'EOS' |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
52 > E # E/e = e\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 > | |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
54 > D # D/b = d\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
55 > | |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
56 > C # C/c = c\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
57 > B2 | # B2/b = b2\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
58 > | B # B/b = b\n |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 > \ / # replace: B -> B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
60 > A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
61 > EOS |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
62 3 new orphan changesets |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
63 $ hg evolve |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
64 move:[3] C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
65 atop:[2] B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
66 move:[4] D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
67 merging b |
5777
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
68 hit merge conflicts; retrying merge in working copy |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
69 merging b |
5776
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
70 warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
71 unresolved merge conflicts |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
72 (see 'hg help evolve.interrupted') |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
73 [240] |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
74 $ hg glog |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
75 @ 6:52da76e91abb draft tip |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
76 | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
77 | * 5:eae7899dd92b draft E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
78 | | E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
79 | % 4:57e51f6a6d36 draft D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
80 | | D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
81 | x 3:bc77848cde3a draft C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
82 | | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
83 o | 2:377a194b9b8a draft B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
84 | | B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
85 | x 1:830b6315076c draft B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
86 |/ B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
87 o 0:426bada5c675 draft A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
88 A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
89 $ cat c |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 c |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
91 $ cat b |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 <<<<<<< destination: 52da76e91abb - test: C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
93 b2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
94 ======= |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
95 d |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
96 >>>>>>> evolving: 57e51f6a6d36 D - test: D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
97 $ echo d2 > b |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
98 $ hg resolve -m |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
99 (no more unresolved files) |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
100 continue: hg evolve --continue |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
101 $ hg evolve --continue |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
102 evolving 4:57e51f6a6d36 "D" |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
103 move:[5] E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
104 atop:[7] D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
105 $ hg glog |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
106 o 8:3c658574f8ed draft tip |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
107 | E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
108 o 7:16e609b952e8 draft |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
109 | D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
110 o 6:52da76e91abb draft |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
111 | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
112 | x 5:eae7899dd92b draft E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
113 | | E |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
114 | x 4:57e51f6a6d36 draft D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
115 | | D |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
116 | x 3:bc77848cde3a draft C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
117 | | C |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
118 o | 2:377a194b9b8a draft B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
119 | | B2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
120 | x 1:830b6315076c draft B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
121 |/ B |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
122 o 0:426bada5c675 draft A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
123 A |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
124 $ hg cat -r tip b c e |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
125 d2 |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
126 c |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
127 e |
453ba695c3d4
tests: add test for in-memory evolve, not actually in-memory yet
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
128 $ cd .. |
5777
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
129 |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
130 Test that in-memory merge is disabled if there's a precommit hook |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
131 |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
132 $ hg init precommit-hook |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
133 $ cd precommit-hook |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
134 $ hg debugdrawdag <<'EOS' |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
135 > C # C/c = c\n |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
136 > B2 | # B2/b = b2\n |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
137 > | B # B/b = b\n |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
138 > \ / # replace: B -> B2 |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
139 > A |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
140 > EOS |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
141 1 new orphan changesets |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
142 $ cat >> .hg/hgrc <<EOF |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
143 > [hooks] |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
144 > precommit = echo "running precommit hook" |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
145 > EOF |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
146 The hook is not run with in-memory=force |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
147 $ hg evolve --config experimental.evolution.in-memory=force |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
148 move:[3] C |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
149 atop:[2] B2 |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
150 $ hg touch tip^ |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
151 1 new orphan changesets |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
152 The hook is run with in-memory=yes |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
153 $ hg evolve --config experimental.evolution.in-memory=yes |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
154 move:[4] C |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
155 atop:[5] B2 |
c5dfbbe4363d
evolve: when relocating, optionally first try to do it using in-memory merge
Martin von Zweigbergk <martinvonz@google.com>
parents:
5776
diff
changeset
|
156 running precommit hook |