comparison tests/test-evolve-content-divergent-stack.t @ 4481:d02a7c8cdee5 stable

test: consolidate the content-divergent test cases This commit move most of the content divergent related test in dedicated and thematic test files.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 10 Apr 2019 14:32:00 +0200
parents tests/test-evolve-content-divergence.t@d52f14bdb468
children 7a5c6109ee84
comparison
equal deleted inserted replaced
4480:d18044dfc584 4481:d02a7c8cdee5
1 =================================================
2 Tests the resolution of content divergence: stack
3 =================================================
4
5 This file intend to cover case with stacks of divergent changesets
6
7 $ cat >> $HGRCPATH <<EOF
8 > [alias]
9 > glog = log -GT "{rev}:{node|short} {desc|firstline}\n ({bookmarks}) [{branch}] {phase}"
10 > [phases]
11 > publish = False
12 > [extensions]
13 > rebase =
14 > EOF
15 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
16
17 Resolving content-divergence of a stack with same parents
18 ---------------------------------------------------------
19
20 $ hg init stacktest
21 $ cd stacktest
22 $ echo ".*\.orig" > .hgignore
23 $ hg add .hgignore
24 $ hg ci -m "added hgignore"
25 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
26
27 $ hg glog
28 @ 4:c41c793e0ef1 added d
29 | () [default] draft
30 o 3:ca1b80f7960a added c
31 | () [default] draft
32 o 2:b1661037fa25 added b
33 | () [default] draft
34 o 1:c7586e2a9264 added a
35 | () [default] draft
36 o 0:8fa14d15e168 added hgignore
37 () [default] draft
38
39 $ cd ..
40 $ hg init stack2
41 $ cd stack2
42 $ hg pull ../stacktest
43 pulling from ../stacktest
44 requesting all changes
45 adding changesets
46 adding manifests
47 adding file changes
48 added 5 changesets with 5 changes to 5 files
49 new changesets 8fa14d15e168:c41c793e0ef1 (5 drafts)
50 (run 'hg update' to get a working copy)
51 $ hg glog
52 o 4:c41c793e0ef1 added d
53 | () [default] draft
54 o 3:ca1b80f7960a added c
55 | () [default] draft
56 o 2:b1661037fa25 added b
57 | () [default] draft
58 o 1:c7586e2a9264 added a
59 | () [default] draft
60 o 0:8fa14d15e168 added hgignore
61 () [default] draft
62
63 $ hg up c7586e2a9264
64 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 $ echo bar > a
66 $ hg amend -m "watbar to a"
67 3 new orphan changesets
68 $ echo wat > a
69 $ hg amend -m "watbar to a"
70 $ hg evolve --all
71 move:[2] added b
72 atop:[6] watbar to a
73 move:[3] added c
74 move:[4] added d
75 working directory is now at 15c781f93cac
76 $ hg glog
77 @ 9:15c781f93cac added d
78 | () [default] draft
79 o 8:9e5fb1d5b955 added c
80 | () [default] draft
81 o 7:88516dccf68a added b
82 | () [default] draft
83 o 6:82b74d5dc678 watbar to a
84 | () [default] draft
85 o 0:8fa14d15e168 added hgignore
86 () [default] draft
87
88 $ cd ../stacktest
89 $ hg up .^^^
90 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
91 $ echo wat > a
92 $ hg amend -m "watbar to a"
93 3 new orphan changesets
94 $ hg evolve --all
95 move:[2] added b
96 atop:[5] watbar to a
97 move:[3] added c
98 move:[4] added d
99 working directory is now at c72d2885eb51
100 $ hg glog
101 @ 8:c72d2885eb51 added d
102 | () [default] draft
103 o 7:3ce4be6d8e5e added c
104 | () [default] draft
105 o 6:d5f148423c16 added b
106 | () [default] draft
107 o 5:8e222f257bbf watbar to a
108 | () [default] draft
109 o 0:8fa14d15e168 added hgignore
110 () [default] draft
111
112 $ hg pull ../stack2
113 pulling from ../stack2
114 searching for changes
115 adding changesets
116 adding manifests
117 adding file changes
118 added 4 changesets with 0 changes to 4 files (+1 heads)
119 5 new obsolescence markers
120 8 new content-divergent changesets
121 new changesets 82b74d5dc678:15c781f93cac (4 drafts)
122 (run 'hg heads' to see heads, 'hg merge' to merge)
123
124 $ hg glog
125 * 12:15c781f93cac added d
126 | () [default] draft
127 * 11:9e5fb1d5b955 added c
128 | () [default] draft
129 * 10:88516dccf68a added b
130 | () [default] draft
131 * 9:82b74d5dc678 watbar to a
132 | () [default] draft
133 | @ 8:c72d2885eb51 added d
134 | | () [default] draft
135 | * 7:3ce4be6d8e5e added c
136 | | () [default] draft
137 | * 6:d5f148423c16 added b
138 | | () [default] draft
139 | * 5:8e222f257bbf watbar to a
140 |/ () [default] draft
141 o 0:8fa14d15e168 added hgignore
142 () [default] draft
143
144 $ hg evolve --all --content-divergent
145 merge:[5] watbar to a
146 with: [9] watbar to a
147 base: [1] added a
148 updating to "local" side of the conflict: 8e222f257bbf
149 merging "other" content-divergent changeset '82b74d5dc678'
150 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 6 new orphan changesets
152 merge:[6] added b
153 with: [10] added b
154 base: [2] added b
155 updating to "local" side of the conflict: d5f148423c16
156 merging "other" content-divergent changeset '88516dccf68a'
157 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 merge:[7] added c
159 with: [11] added c
160 base: [3] added c
161 updating to "local" side of the conflict: 3ce4be6d8e5e
162 merging "other" content-divergent changeset '9e5fb1d5b955'
163 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
164 merge:[8] added d
165 with: [12] added d
166 base: [4] added d
167 updating to "local" side of the conflict: c72d2885eb51
168 merging "other" content-divergent changeset '15c781f93cac'
169 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 working directory is now at 038fe7db3d88
171
172 $ hg glog
173 @ 16:038fe7db3d88 added d
174 | () [default] draft
175 o 15:b2cac10f3836 added c
176 | () [default] draft
177 o 14:eadfd9d70680 added b
178 | () [default] draft
179 o 13:f66f262fff6c watbar to a
180 | () [default] draft
181 o 0:8fa14d15e168 added hgignore
182 () [default] draft