comparison tests/test-split.t @ 3013:945a0989e41b

packaging: merge stable back into default 6.7.0 has been released.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Sep 2017 16:26:30 +0200
parents bd7e8be29542
children 4b951a9a6895
comparison
equal deleted inserted replaced
3012:081070828703 3013:945a0989e41b
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 |
146 $ hg phase --rev 'desc("_a")' --draft --force 144 $ hg phase --rev 'desc("_a")' --draft --force
147 145
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 unstable 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
414 $ echo celeste > celeste 410 $ echo celeste > celeste
415 $ hg add babar celeste 411 $ hg add babar celeste
416 $ hg commit -m "Works on mytopic" babar celeste --user victor 412 $ hg commit -m "Works on mytopic" babar celeste --user victor
417 active topic 'mytopic' grew its first changeset 413 active topic 'mytopic' grew its first changeset
418 $ hg log -r . 414 $ hg log -r .
419 changeset: 21:26f72cfaf036 415 changeset: 18:26f72cfaf036
420 branch: new-branch 416 branch: new-branch
421 tag: tip 417 tag: tip
422 topic: mytopic 418 topic: mytopic
423 user: victor 419 user: victor
424 date: Thu Jan 01 00:00:00 1970 +0000 420 date: Thu Jan 01 00:00:00 1970 +0000
425 summary: Works on mytopic 421 summary: Works on mytopic
426 422
427 $ hg summary 423 $ hg summary
428 parent: 21:26f72cfaf036 tip 424 parent: 18:26f72cfaf036 tip
429 Works on mytopic 425 Works on mytopic
430 branch: new-branch 426 branch: new-branch
431 commit: 2 unknown (clean) 427 commit: 2 unknown (clean)
432 update: (current) 428 update: (current)
433 phases: 9 draft 429 phases: 9 draft
470 no more change to split 466 no more change to split
471 467
472 Check that the topic is still here 468 Check that the topic is still here
473 469
474 $ hg log -r "tip~1::" 470 $ hg log -r "tip~1::"
475 changeset: 22:addcf498f19e 471 changeset: 19:addcf498f19e
476 branch: new-branch 472 branch: new-branch
477 topic: mytopic 473 topic: mytopic
478 parent: 20:fdb403258632 474 parent: 17:fdb403258632
479 user: test 475 user: test
480 date: Thu Jan 01 00:00:00 1970 +0000 476 date: Thu Jan 01 00:00:00 1970 +0000
481 summary: split7 477 summary: split7
482 478
483 changeset: 23:2532b288af61 479 changeset: 20:2532b288af61
484 branch: new-branch 480 branch: new-branch
485 tag: tip 481 tag: tip
486 topic: mytopic 482 topic: mytopic
487 user: test 483 user: test
488 date: Thu Jan 01 00:00:00 1970 +0000 484 date: Thu Jan 01 00:00:00 1970 +0000