Mercurial > evolve
annotate tests/test-evolve-stop-contentdiv.t @ 3788:ae30da2e210d
evolve: store the base of content-divergents in evolvestate
We need the base changeset for merging commit messages, branches. Let's store it
in evolvestate.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 05 Jun 2018 03:49:49 +0530 |
parents | 777c29ac02bf |
children | 7b33a6ed0539 |
rev | line source |
---|---|
3761
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
1 Tests for the --stop flag for `hg evolve` command while resolving content-divergence |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
2 ================================================================================== |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
3 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 The `--stop` flag stops the interrupted evolution and delete the state file so |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
5 user can do other things and comeback and do evolution later on |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
6 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 This is testing cases when `hg evolve` command is doing content-divergence resolution. |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 Setup |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 ===== |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 $ cat >> $HGRCPATH <<EOF |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 > [alias] |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 > [extensions] |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 > EOF |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 $ hg init stoprepo |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 $ cd stoprepo |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
21 $ echo ".*\.orig" > .hgignore |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 $ hg add .hgignore |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 $ hg ci -m "added hgignore" |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
24 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
25 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 $ hg glog |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 @ 4:c41c793e0ef1 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
28 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
29 o 3:ca1b80f7960a added c |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
30 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
31 o 2:b1661037fa25 added b |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
32 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
33 o 1:c7586e2a9264 added a |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 o 0:8fa14d15e168 added hgignore |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
37 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
38 Creating content divergence, resolution of which will lead to conflicts |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
39 ----------------------------------------------------------------------- |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
41 $ echo bar > d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
42 $ hg amend |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
43 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 $ hg up c41c793e0ef1 --hidden |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 updated to hidden changeset c41c793e0ef1 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8) |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 working directory parent is obsolete! (c41c793e0ef1) |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
49 (use 'hg evolve' to update to its successor: e49523854bc8) |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 $ echo foobar > d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
52 $ hg amend |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
53 2 new content-divergent changesets |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
54 $ hg glog --hidden |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
55 @ 6:9c1631e352d9 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
56 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
57 | * 5:e49523854bc8 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
58 |/ () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
59 | x 4:c41c793e0ef1 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 |/ () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
61 o 3:ca1b80f7960a added c |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
62 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
63 o 2:b1661037fa25 added b |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
64 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
65 o 1:c7586e2a9264 added a |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
66 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
67 o 0:8fa14d15e168 added hgignore |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
69 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
70 $ hg evolve --content-divergent |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
71 merge:[6] added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
72 with: [5] added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
73 base: [4] added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
74 merging "other" content-divergent changeset 'e49523854bc8' |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
75 merging d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
76 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
77 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
78 abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
79 [255] |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
80 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
81 $ hg evolve --stop |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
82 stopped the interrupted evolve |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
83 working directory is now at 9c1631e352d9 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
84 |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
85 $ hg glog --hidden |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
86 @ 6:9c1631e352d9 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
87 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
88 | * 5:e49523854bc8 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
89 |/ () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
90 | x 4:c41c793e0ef1 added d |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
91 |/ () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
92 o 3:ca1b80f7960a added c |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
93 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
94 o 2:b1661037fa25 added b |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
95 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
96 o 1:c7586e2a9264 added a |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
97 | () draft |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
98 o 0:8fa14d15e168 added hgignore |
777c29ac02bf
content-div: add test showing `--stop` works during interrupted resolution
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
99 () draft |