comparison tests/test-evolve-order.t @ 4207:3d917da5bd95 mercurial-4.3

test-compat: merge mercurial-4.4 into mercurial-4.3
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 25 Oct 2018 16:33:10 +0200
parents e07e764c0f48
children
comparison
equal deleted inserted replaced
4206:04aeaec6ec07 4207:3d917da5bd95
42 $ hg phase --public 0 42 $ hg phase --public 0
43 $ hg up 'desc(_a)' 43 $ hg up 'desc(_a)'
44 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 44 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
45 $ echo "aaa" > _a 45 $ echo "aaa" > _a
46 $ hg amend 46 $ hg amend
47 2 new orphan changesets 47 2 new unstable changesets
48 $ hg log -G 48 $ hg log -G
49 @ 4:12d519679175@default(draft) add _a 49 @ 5:12d519679175@default(draft) add _a
50 | 50 |
51 | o 3:4d156641b718@default(draft) add _c 51 | o 3:4d156641b718@default(draft) add _c
52 | | 52 | |
53 | o 2:4d7242ebb004@default(draft) add _b 53 | o 2:4d7242ebb004@default(draft) add _b
54 | | 54 | |
58 58
59 59
60 evolve --rev reorders the rev to solve instability, trivial case 2 revs wrong order 60 evolve --rev reorders the rev to solve instability, trivial case 2 revs wrong order
61 $ hg evolve --rev 'desc(_c) + desc(_b)' 61 $ hg evolve --rev 'desc(_c) + desc(_b)'
62 move:[2] add _b 62 move:[2] add _b
63 atop:[4] add _a 63 atop:[5] add _a
64 move:[3] add _c 64 move:[3] add _c
65 working directory is now at 52b8f9b04f83 65 working directory is now at 52b8f9b04f83
66 66
67 evolve --rev reorders the rev to solve instability. Harder case, obsolescence 67 evolve --rev reorders the rev to solve instability. Harder case, obsolescence
68 accross three stacks in growing rev numbers. 68 accross three stacks in growing rev numbers.
70 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 70 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 $ mkcommit _d 71 $ mkcommit _d
72 $ hg up "desc(_a)" 72 $ hg up "desc(_a)"
73 0 files updated, 0 files merged, 3 files removed, 0 files unresolved 73 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
74 $ hg amend -m "aprime" 74 $ hg amend -m "aprime"
75 3 new orphan changesets 75 3 new unstable changesets
76 $ hg evolve --rev "desc(_b)" 76 $ hg evolve --rev "desc(_b)"
77 move:[5] add _b 77 move:[6] add _b
78 atop:[8] aprime 78 atop:[9] aprime
79 working directory is now at 476c9c052aae 79 working directory is now at 476c9c052aae
80 $ hg up "desc(_b) - obsolete()" 80 $ hg up "desc(_b) - obsolete()"
81 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 81 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 $ hg amend -m "bprime" 82 $ hg amend -m "bprime"
83 $ hg up "desc(aprime)" 83 $ hg up "desc(aprime)"
84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
85 $ hg amend -m "asecond" 85 $ hg amend -m "asecond"
86 1 new orphan changesets 86 1 new unstable changesets
87 $ hg log -G 87 $ hg log -G
88 @ 11:9a584314f3f3@default(draft) asecond 88 @ 12:9a584314f3f3@default(draft) asecond
89 | 89 |
90 | o 10:a59c79776f7c@default(draft) bprime 90 | o 11:a59c79776f7c@default(draft) bprime
91 | | 91 | |
92 | x 8:81a687b96d4d@default(draft) aprime 92 | x 9:81a687b96d4d@default(draft) aprime
93 |/ 93 |/
94 | o 7:464731bc0ed0@default(draft) add _d 94 | o 8:464731bc0ed0@default(draft) add _d
95 | | 95 | |
96 | o 6:52b8f9b04f83@default(draft) add _c 96 | o 7:52b8f9b04f83@default(draft) add _c
97 | | 97 | |
98 | x 5:59476c3836ef@default(draft) add _b 98 | x 6:59476c3836ef@default(draft) add _b
99 | | 99 | |
100 | x 4:12d519679175@default(draft) add _a 100 | x 5:12d519679175@default(draft) add _a
101 |/ 101 |/
102 o 0:f92638be10c7@default(public) add p 102 o 0:f92638be10c7@default(public) add p
103 103
104 $ hg evolve --rev "orphan()" 104 $ hg evolve --rev "orphan()"
105 move:[10] bprime 105 move:[11] bprime
106 atop:[11] asecond 106 atop:[12] asecond
107 move:[6] add _c 107 move:[7] add _c
108 move:[7] add _d 108 move:[8] add _d
109 working directory is now at 739f18ac1d03 109 working directory is now at 739f18ac1d03
110 $ hg log -G 110 $ hg log -G
111 @ 14:739f18ac1d03@default(draft) add _d 111 @ 15:739f18ac1d03@default(draft) add _d
112 | 112 |
113 o 13:e5960578d158@default(draft) add _c 113 o 14:e5960578d158@default(draft) add _c
114 | 114 |
115 o 12:4ad33fa88946@default(draft) bprime 115 o 13:4ad33fa88946@default(draft) bprime
116 | 116 |
117 o 11:9a584314f3f3@default(draft) asecond 117 o 12:9a584314f3f3@default(draft) asecond
118 | 118 |
119 o 0:f92638be10c7@default(public) add p 119 o 0:f92638be10c7@default(public) add p
120 120
121 121
122 Evolve --rev more complex case: two sets of stacks one with prune an no successor, the other one 122 Evolve --rev more complex case: two sets of stacks one with prune an no successor, the other one
126 $ mkstack "desc(_d)" c1_ c2_ c3_ c4_ >/dev/null 126 $ mkstack "desc(_d)" c1_ c2_ c3_ c4_ >/dev/null
127 $ mkstack "desc(_d)" c1prime c2prime >/dev/null 127 $ mkstack "desc(_d)" c1prime c2prime >/dev/null
128 $ mkstack "desc(_d)" c1second >/dev/null 128 $ mkstack "desc(_d)" c1second >/dev/null
129 $ hg prune "desc(c1_)" -s "desc(c1prime)" 129 $ hg prune "desc(c1_)" -s "desc(c1prime)"
130 1 changesets pruned 130 1 changesets pruned
131 3 new orphan changesets 131 3 new unstable changesets
132 $ hg prune "desc(c2_)" -s "desc(c2prime)" 132 $ hg prune "desc(c2_)" -s "desc(c2prime)"
133 1 changesets pruned 133 1 changesets pruned
134 $ hg prune "desc(c1prime)" -s "desc(c1second)" 134 $ hg prune "desc(c1prime)" -s "desc(c1second)"
135 1 changesets pruned 135 1 changesets pruned
136 1 new orphan changesets 136 1 new unstable changesets
137 $ hg log -G -r "desc(_d)::" 137 $ hg log -G -r "desc(_d)::"
138 @ 21:dcf786e878fd@default(draft) add c1second 138 @ 22:dcf786e878fd@default(draft) add c1second
139 | 139 |
140 | o 20:507d52d715f6@default(draft) add c2prime 140 | o 21:507d52d715f6@default(draft) add c2prime
141 | | 141 | |
142 | x 19:c995cb124ddc@default(draft) add c1prime 142 | x 20:c995cb124ddc@default(draft) add c1prime
143 |/ 143 |/
144 | o 18:d096a2437fd0@default(draft) add c4_ 144 | o 19:d096a2437fd0@default(draft) add c4_
145 | | 145 | |
146 | o 17:cde95c6cba7a@default(draft) add c3_ 146 | o 18:cde95c6cba7a@default(draft) add c3_
147 | | 147 | |
148 | x 16:e0d9f7a099fe@default(draft) add c2_ 148 | x 17:e0d9f7a099fe@default(draft) add c2_
149 | | 149 | |
150 | x 15:43b7c338b1f8@default(draft) add c1_ 150 | x 16:43b7c338b1f8@default(draft) add c1_
151 |/ 151 |/
152 o 14:739f18ac1d03@default(draft) add _d 152 o 15:739f18ac1d03@default(draft) add _d
153 | 153 |
154 ~ 154 ~
155 155
156 Second set of stack with no successor for b2_: 156 Second set of stack with no successor for b2_:
157 $ mkstack "desc(_d)" b1_ b2_ b3_ b4_ >/dev/null 157 $ mkstack "desc(_d)" b1_ b2_ b3_ b4_ >/dev/null
158 $ mkstack "desc(_d)" b1prime b3prime >/dev/null 158 $ mkstack "desc(_d)" b1prime b3prime >/dev/null
159 $ hg prune "desc(b1_)" -s "desc(b1prime)" 159 $ hg prune "desc(b1_)" -s "desc(b1prime)"
160 1 changesets pruned 160 1 changesets pruned
161 3 new orphan changesets 161 3 new unstable changesets
162 $ hg prune "desc(b3_)" -s "desc(b3prime)" 162 $ hg prune "desc(b3_)" -s "desc(b3prime)"
163 1 changesets pruned 163 1 changesets pruned
164 $ hg prune "desc(b2_)" 164 $ hg prune "desc(b2_)"
165 1 changesets pruned 165 1 changesets pruned
166 166
167 $ hg log -G -r "desc(_d)::" 167 $ hg log -G -r "desc(_d)::"
168 @ 27:b253ff5b65d1@default(draft) add b3prime 168 @ 28:b253ff5b65d1@default(draft) add b3prime
169 | 169 |
170 o 26:4acf61f11dfb@default(draft) add b1prime 170 o 27:4acf61f11dfb@default(draft) add b1prime
171 | 171 |
172 | o 25:594e1fbbd61f@default(draft) add b4_ 172 | o 26:594e1fbbd61f@default(draft) add b4_
173 | | 173 | |
174 | x 24:be27500cfc76@default(draft) add b3_ 174 | x 25:be27500cfc76@default(draft) add b3_
175 | | 175 | |
176 | x 23:b54f77dc5831@default(draft) add b2_ 176 | x 24:b54f77dc5831@default(draft) add b2_
177 | | 177 | |
178 | x 22:0e1eba27e9aa@default(draft) add b1_ 178 | x 23:0e1eba27e9aa@default(draft) add b1_
179 |/ 179 |/
180 | o 21:dcf786e878fd@default(draft) add c1second 180 | o 22:dcf786e878fd@default(draft) add c1second
181 |/ 181 |/
182 | o 20:507d52d715f6@default(draft) add c2prime 182 | o 21:507d52d715f6@default(draft) add c2prime
183 | | 183 | |
184 | x 19:c995cb124ddc@default(draft) add c1prime 184 | x 20:c995cb124ddc@default(draft) add c1prime
185 |/ 185 |/
186 | o 18:d096a2437fd0@default(draft) add c4_ 186 | o 19:d096a2437fd0@default(draft) add c4_
187 | | 187 | |
188 | o 17:cde95c6cba7a@default(draft) add c3_ 188 | o 18:cde95c6cba7a@default(draft) add c3_
189 | | 189 | |
190 | x 16:e0d9f7a099fe@default(draft) add c2_ 190 | x 17:e0d9f7a099fe@default(draft) add c2_
191 | | 191 | |
192 | x 15:43b7c338b1f8@default(draft) add c1_ 192 | x 16:43b7c338b1f8@default(draft) add c1_
193 |/ 193 |/
194 o 14:739f18ac1d03@default(draft) add _d 194 o 15:739f18ac1d03@default(draft) add _d
195 | 195 |
196 ~ 196 ~
197 197
198 Solve the full second stack and only part of the first one 198 Solve the full second stack and only part of the first one
199 $ echo "(desc(_d)::) - desc(c3_)" 199 $ echo "(desc(_d)::) - desc(c3_)"
200 (desc(_d)::) - desc(c3_) 200 (desc(_d)::) - desc(c3_)
201 $ hg evolve --rev "(desc(_d)::) - desc(c3_)" 201 $ hg evolve --rev "(desc(_d)::) - desc(c3_)"
202 cannot solve instability of d096a2437fd0, skipping 202 cannot solve instability of d096a2437fd0, skipping
203 move:[20] add c2prime 203 move:[21] add c2prime
204 atop:[21] add c1second 204 atop:[22] add c1second
205 move:[25] add b4_ 205 move:[26] add b4_
206 atop:[27] add b3prime 206 atop:[28] add b3prime
207 working directory is now at ea93190a9cd1 207 working directory is now at ea93190a9cd1
208 208
209 Cleanup 209 Cleanup
210 $ hg evolve --rev "(desc(_d)::)" 210 $ hg evolve --rev "(desc(_d)::)"
211 move:[17] add c3_ 211 move:[18] add c3_
212 atop:[28] add c2prime 212 atop:[29] add c2prime
213 move:[18] add c4_ 213 move:[19] add c4_
214 working directory is now at 35e7b797ace5 214 working directory is now at 35e7b797ace5
215 $ hg log -G -r "desc(_d)::" 215 $ hg log -G -r "desc(_d)::"
216 @ 31:35e7b797ace5@default(draft) add c4_ 216 @ 32:35e7b797ace5@default(draft) add c4_
217 | 217 |
218 o 30:0b9488394e89@default(draft) add c3_ 218 o 31:0b9488394e89@default(draft) add c3_
219 | 219 |
220 | o 29:ea93190a9cd1@default(draft) add b4_ 220 | o 30:ea93190a9cd1@default(draft) add b4_
221 | | 221 | |
222 o | 28:881b9c092e53@default(draft) add c2prime 222 o | 29:881b9c092e53@default(draft) add c2prime
223 | | 223 | |
224 | o 27:b253ff5b65d1@default(draft) add b3prime 224 | o 28:b253ff5b65d1@default(draft) add b3prime
225 | | 225 | |
226 | o 26:4acf61f11dfb@default(draft) add b1prime 226 | o 27:4acf61f11dfb@default(draft) add b1prime
227 | | 227 | |
228 o | 21:dcf786e878fd@default(draft) add c1second 228 o | 22:dcf786e878fd@default(draft) add c1second
229 |/ 229 |/
230 o 14:739f18ac1d03@default(draft) add _d 230 o 15:739f18ac1d03@default(draft) add _d
231 | 231 |
232 ~ 232 ~
233 233
234 Test multiple revision with some un-evolvable because parent is splitted 234 Test multiple revision with some un-evolvable because parent is splitted
235 ------------------------------------------------------------------------ 235 ------------------------------------------------------------------------
238 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 238 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
239 $ mkcommit c3part1 239 $ mkcommit c3part1
240 created new head 240 created new head
241 $ hg prev 241 $ hg prev
242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
243 [28] add c2prime 243 [29] add c2prime
244 $ mkcommit c3part2 244 $ mkcommit c3part2
245 created new head 245 created new head
246 $ hg prune -s 'desc(c3part1)' 'desc(c3_)' 246 $ hg prune -s 'desc(c3part1)' 'desc(c3_)'
247 1 changesets pruned 247 1 changesets pruned
248 1 new orphan changesets 248 1 new unstable changesets
249 $ hg prune -s 'desc(c3part2)' 'desc(c3_)' 249 $ hg prune -s 'desc(c3part2)' 'desc(c3_)'
250 1 changesets pruned 250 1 changesets pruned
251 2 new content-divergent changesets 251 2 new divergent changesets
252 $ hg up 'desc(b3prime)' 252 $ hg up 'desc(b3prime)'
253 2 files updated, 0 files merged, 3 files removed, 0 files unresolved 253 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
254 $ hg amend -m 'b3second' 254 $ hg amend -m 'b3second'
255 1 new orphan changesets 255 1 new unstable changesets
256 $ hg evolve --rev "orphan()" 256 $ hg evolve --rev "orphan()"
257 move:[29] add b4_ 257 move:[30] add b4_
258 atop:[34] b3second 258 atop:[35] b3second
259 skipping 0b9488394e89: divergent rewriting. can't choose destination 259 skipping 0b9488394e89: divergent rewriting. can't choose destination
260 working directory is now at 31809a198477 260 working directory is now at 31809a198477
261 261