Mercurial > evolve
comparison tests/test-split.t @ 2929:06844693bb21
tests: update after removing of redundant amend commit
Following e8a7c1a0565a, temporary amend commits has been removed impacting all
revision numbers in tests including amend operations.
Update tests case to use description or hashes when possible and update
revisions number when not.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 15 Sep 2017 15:48:18 +0200 |
parents | 66796d7b5415 |
children | f63c97c01f92 |
comparison
equal
deleted
inserted
replaced
2928:6275808e89ef | 2929:06844693bb21 |
---|---|
38 $ mkcommit _d | 38 $ mkcommit _d |
39 $ echo "change to a" >> _a | 39 $ echo "change to a" >> _a |
40 $ hg amend | 40 $ hg amend |
41 $ hg debugobsolete | 41 $ hg debugobsolete |
42 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) | 42 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
43 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) | |
44 | 43 |
45 To create commits with the number of split | 44 To create commits with the number of split |
46 $ echo 0 > num | 45 $ echo 0 > num |
47 $ cat > editor.sh << '__EOF__' | 46 $ cat > editor.sh << '__EOF__' |
48 > NUM=$(cat num) | 47 > NUM=$(cat num) |
91 | 90 |
92 no more change to split | 91 no more change to split |
93 | 92 |
94 $ hg debugobsolete | 93 $ hg debugobsolete |
95 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) | 94 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
96 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) | |
97 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) | 95 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
98 $ hg log -G | 96 $ hg log -G |
99 @ changeset: 7:033b3f5ae73d | 97 @ changeset: 6:033b3f5ae73d |
100 | tag: tip | 98 | tag: tip |
101 | user: test | 99 | user: test |
102 | date: Thu Jan 01 00:00:00 1970 +0000 | 100 | date: Thu Jan 01 00:00:00 1970 +0000 |
103 | summary: split2 | 101 | summary: split2 |
104 | | 102 | |
105 o changeset: 6:2d8abdb827cd | 103 o changeset: 5:2d8abdb827cd |
106 | parent: 2:52149352b372 | 104 | parent: 2:52149352b372 |
107 | user: test | 105 | user: test |
108 | date: Thu Jan 01 00:00:00 1970 +0000 | 106 | date: Thu Jan 01 00:00:00 1970 +0000 |
109 | summary: split1 | 107 | summary: split1 |
110 | | 108 | |
148 Split a revision specified with -r | 146 Split a revision specified with -r |
149 $ echo "change to b" >> _b | 147 $ echo "change to b" >> _b |
150 $ hg amend -m "_cprim" | 148 $ hg amend -m "_cprim" |
151 2 new orphan changesets | 149 2 new orphan changesets |
152 $ hg evolve --all | 150 $ hg evolve --all |
153 move:[6] split1 | 151 move:[5] split1 |
154 atop:[9] _cprim | 152 atop:[7] _cprim |
155 move:[7] split2 | 153 move:[6] split2 |
156 atop:[10] split1 | 154 atop:[8] split1 |
157 working directory is now at * (glob) | 155 working directory is now at * (glob) |
158 $ hg log -r "desc(_cprim)" -v -p | 156 $ hg log -r "desc(_cprim)" -v -p |
159 changeset: 9:b434287e665c | 157 changeset: 7:b434287e665c |
160 parent: 1:37445b16603b | 158 parent: 1:37445b16603b |
161 user: other-test-user | 159 user: other-test-user |
162 date: Thu Jan 01 00:00:00 1970 +0000 | 160 date: Thu Jan 01 00:00:00 1970 +0000 |
163 files: _b _c | 161 files: _b _c |
164 description: | 162 description: |
209 Stop before splitting the commit completely creates a commit with all the | 207 Stop before splitting the commit completely creates a commit with all the |
210 remaining changes | 208 remaining changes |
211 | 209 |
212 $ hg debugobsolete | 210 $ hg debugobsolete |
213 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) | 211 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
214 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) | |
215 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) | 212 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
216 52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (*) {'ef1': '9', 'user': 'test'} (glob) | 213 52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (*) {'ef1': '9', 'user': 'test'} (glob) |
217 7a4fc25a48a5797bb069563854455aecf738d8f2 0 {52149352b372d39b19127d5bd2d488b1b63f9f85} (*) {'ef1': '0', 'user': 'test'} (glob) | |
218 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (*) {'ef1': '4', 'user': 'test'} (glob) | 214 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (*) {'ef1': '4', 'user': 'test'} (glob) |
219 033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (*) {'ef1': '4', 'user': 'test'} (glob) | 215 033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (*) {'ef1': '4', 'user': 'test'} (glob) |
220 b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (*) {'ef1': '13', 'user': 'test'} (glob) | 216 b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
221 $ hg evolve --all | 217 $ hg evolve --all |
222 move:[10] split1 | 218 move:[8] split1 |
223 atop:[13] split4 | 219 atop:[11] split4 |
224 move:[11] split2 | 220 move:[9] split2 |
225 atop:[14] split1 | 221 atop:[12] split1 |
226 working directory is now at d74c6715e706 | 222 working directory is now at d74c6715e706 |
227 $ hg log -G | 223 $ hg log -G |
228 @ changeset: 15:d74c6715e706 | 224 @ changeset: 13:d74c6715e706 |
229 | tag: tip | 225 | tag: tip |
230 | user: test | 226 | user: test |
231 | date: Thu Jan 01 00:00:00 1970 +0000 | 227 | date: Thu Jan 01 00:00:00 1970 +0000 |
232 | summary: split2 | 228 | summary: split2 |
233 | | 229 | |
234 o changeset: 14:3f134f739075 | 230 o changeset: 12:3f134f739075 |
235 | user: test | 231 | user: test |
236 | date: Thu Jan 01 00:00:00 1970 +0000 | 232 | date: Thu Jan 01 00:00:00 1970 +0000 |
237 | summary: split1 | 233 | summary: split1 |
238 | | 234 | |
239 o changeset: 13:1188c4216eba | 235 o changeset: 11:1188c4216eba |
240 | user: other-test-user | 236 | user: other-test-user |
241 | date: Thu Jan 01 00:00:00 1970 +0000 | 237 | date: Thu Jan 01 00:00:00 1970 +0000 |
242 | summary: split4 | 238 | summary: split4 |
243 | | 239 | |
244 o changeset: 12:ead2066d1dbf | 240 o changeset: 10:ead2066d1dbf |
245 | parent: 1:37445b16603b | 241 | parent: 1:37445b16603b |
246 | user: other-test-user | 242 | user: other-test-user |
247 | date: Thu Jan 01 00:00:00 1970 +0000 | 243 | date: Thu Jan 01 00:00:00 1970 +0000 |
248 | summary: split3 | 244 | summary: split3 |
249 | | 245 | |
263 $ hg book bookA | 259 $ hg book bookA |
264 $ hg book bookB | 260 $ hg book bookB |
265 $ echo "changetofilea" > _a | 261 $ echo "changetofilea" > _a |
266 $ hg amend | 262 $ hg amend |
267 $ hg book | 263 $ hg book |
268 bookA 17:7a6b35779b85 | 264 bookA 14:7a6b35779b85 |
269 * bookB 17:7a6b35779b85 | 265 * bookB 14:7a6b35779b85 |
270 $ hg log -G -r "14::" | 266 $ hg log -G -r "3f134f739075::" |
271 @ changeset: 17:7a6b35779b85 | 267 @ changeset: 14:7a6b35779b85 |
272 | bookmark: bookA | 268 | bookmark: bookA |
273 | bookmark: bookB | 269 | bookmark: bookB |
274 | tag: tip | 270 | tag: tip |
275 | parent: 14:3f134f739075 | 271 | parent: 12:3f134f739075 |
276 | user: test | 272 | user: test |
277 | date: Thu Jan 01 00:00:00 1970 +0000 | 273 | date: Thu Jan 01 00:00:00 1970 +0000 |
278 | summary: split2 | 274 | summary: split2 |
279 | | 275 | |
280 o changeset: 14:3f134f739075 | 276 o changeset: 12:3f134f739075 |
281 | user: test | 277 | user: test |
282 ~ date: Thu Jan 01 00:00:00 1970 +0000 | 278 ~ date: Thu Jan 01 00:00:00 1970 +0000 |
283 summary: split1 | 279 summary: split1 |
284 | 280 |
285 $ hg split --user victor <<EOF | 281 $ hg split --user victor <<EOF |
306 new file mode 100644 | 302 new file mode 100644 |
307 examine changes to '_d'? [Ynesfdaq?] n | 303 examine changes to '_d'? [Ynesfdaq?] n |
308 | 304 |
309 created new head | 305 created new head |
310 Done splitting? [yN] y | 306 Done splitting? [yN] y |
311 $ hg log -G -r "14::" | 307 $ hg log -G -r "3f134f739075::" |
312 @ changeset: 19:452a26648478 | 308 @ changeset: 16:452a26648478 |
313 | bookmark: bookA | 309 | bookmark: bookA |
314 | bookmark: bookB | 310 | bookmark: bookB |
315 | tag: tip | 311 | tag: tip |
316 | user: victor | 312 | user: victor |
317 | date: Thu Jan 01 00:00:00 1970 +0000 | 313 | date: Thu Jan 01 00:00:00 1970 +0000 |
318 | summary: split6 | 314 | summary: split6 |
319 | | 315 | |
320 o changeset: 18:1315679b77dc | 316 o changeset: 15:1315679b77dc |
321 | parent: 14:3f134f739075 | 317 | parent: 12:3f134f739075 |
322 | user: victor | 318 | user: victor |
323 | date: Thu Jan 01 00:00:00 1970 +0000 | 319 | date: Thu Jan 01 00:00:00 1970 +0000 |
324 | summary: split5 | 320 | summary: split5 |
325 | | 321 | |
326 o changeset: 14:3f134f739075 | 322 o changeset: 12:3f134f739075 |
327 | user: test | 323 | user: test |
328 ~ date: Thu Jan 01 00:00:00 1970 +0000 | 324 ~ date: Thu Jan 01 00:00:00 1970 +0000 |
329 summary: split1 | 325 summary: split1 |
330 | 326 |
331 $ hg book | 327 $ hg book |
332 bookA 19:452a26648478 | 328 bookA 16:452a26648478 |
333 * bookB 19:452a26648478 | 329 * bookB 16:452a26648478 |
334 | 330 |
335 Lastest revision is selected if multiple are given to -r | 331 Lastest revision is selected if multiple are given to -r |
336 $ hg split -r "desc(_a)::" | 332 $ hg split -r "desc(_a)::" |
337 (leaving bookmark bookB) | 333 (leaving bookmark bookB) |
338 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 334 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
412 $ echo babar > babar | 408 $ echo babar > babar |
413 $ echo celeste > celeste | 409 $ echo celeste > celeste |
414 $ hg add babar celeste | 410 $ hg add babar celeste |
415 $ hg commit -m "Works on mytopic" babar celeste --user victor | 411 $ hg commit -m "Works on mytopic" babar celeste --user victor |
416 $ hg log -r . | 412 $ hg log -r . |
417 changeset: 21:26f72cfaf036 | 413 changeset: 18:26f72cfaf036 |
418 branch: new-branch | 414 branch: new-branch |
419 tag: tip | 415 tag: tip |
420 topic: mytopic | 416 topic: mytopic |
421 user: victor | 417 user: victor |
422 date: Thu Jan 01 00:00:00 1970 +0000 | 418 date: Thu Jan 01 00:00:00 1970 +0000 |
423 summary: Works on mytopic | 419 summary: Works on mytopic |
424 | 420 |
425 $ hg summary | 421 $ hg summary |
426 parent: 21:26f72cfaf036 tip | 422 parent: 18:26f72cfaf036 tip |
427 Works on mytopic | 423 Works on mytopic |
428 branch: new-branch | 424 branch: new-branch |
429 commit: 2 unknown (clean) | 425 commit: 2 unknown (clean) |
430 update: (current) | 426 update: (current) |
431 phases: 9 draft | 427 phases: 9 draft |
468 no more change to split | 464 no more change to split |
469 | 465 |
470 Check that the topic is still here | 466 Check that the topic is still here |
471 | 467 |
472 $ hg log -r "tip~1::" | 468 $ hg log -r "tip~1::" |
473 changeset: 22:addcf498f19e | 469 changeset: 19:addcf498f19e |
474 branch: new-branch | 470 branch: new-branch |
475 topic: mytopic | 471 topic: mytopic |
476 parent: 20:fdb403258632 | 472 parent: 17:fdb403258632 |
477 user: test | 473 user: test |
478 date: Thu Jan 01 00:00:00 1970 +0000 | 474 date: Thu Jan 01 00:00:00 1970 +0000 |
479 summary: split7 | 475 summary: split7 |
480 | 476 |
481 changeset: 23:2532b288af61 | 477 changeset: 20:2532b288af61 |
482 branch: new-branch | 478 branch: new-branch |
483 tag: tip | 479 tag: tip |
484 topic: mytopic | 480 topic: mytopic |
485 user: test | 481 user: test |
486 date: Thu Jan 01 00:00:00 1970 +0000 | 482 date: Thu Jan 01 00:00:00 1970 +0000 |