comparison tests/test-topic-stack.t @ 3105:f5d472b7e800 mercurial-4.3

test-compat: revert output changes related to temporary amend commit This backed out changeset 06844693bb21 and other related changes.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 20 Oct 2017 19:32:18 +0200
parents 6604d96fc73c
children 9c9c8c1eeb93 c0ee9ddfd5ff
comparison
equal deleted inserted replaced
3104:3dd5a6f83f8b 3105:f5d472b7e800
261 ------------------------------------ 261 ------------------------------------
262 262
263 $ echo bbb > ddd 263 $ echo bbb > ddd
264 $ hg commit --amend 264 $ hg commit --amend
265 $ hg log -G 265 $ hg log -G
266 @ 6 default {foo} draft c_d 266 @ 7 default {foo} draft c_d
267 | 267 |
268 | o 5 default {foo} draft c_f 268 | o 5 default {foo} draft c_f
269 | | 269 | |
270 | o 4 default {foo} draft c_e 270 | o 4 default {foo} draft c_e
271 | | 271 | |
308 308
309 Also test the revset: 309 Also test the revset:
310 310
311 $ hg log -r 'stack()' 311 $ hg log -r 'stack()'
312 2 default {foo} draft c_c 312 2 default {foo} draft c_c
313 6 default {foo} draft c_d 313 7 default {foo} draft c_d
314 4 default {foo} draft c_e 314 4 default {foo} draft c_e
315 5 default {foo} draft c_f 315 5 default {foo} draft c_f
316 316
317 $ hg log -r 'stack(foo)' 317 $ hg log -r 'stack(foo)'
318 hg: parse error: stack() takes no argument, it works on current topic 318 hg: parse error: stack() takes no argument, it works on current topic
329 329
330 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()' 330 $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
331 rebasing 4:0f9ac936c87d "c_e" 331 rebasing 4:0f9ac936c87d "c_e"
332 rebasing 5:6559e6d93aea "c_f" 332 rebasing 5:6559e6d93aea "c_f"
333 $ hg log -G 333 $ hg log -G
334 o 8 default {foo} draft c_f 334 o 9 default {foo} draft c_f
335 | 335 |
336 o 7 default {foo} draft c_e 336 o 8 default {foo} draft c_e
337 | 337 |
338 @ 6 default {foo} draft c_d 338 @ 7 default {foo} draft c_d
339 | 339 |
340 o 2 default {foo} draft c_c 340 o 2 default {foo} draft c_c
341 | 341 |
342 o 1 default {} public c_b 342 o 1 default {} public c_b
343 | 343 |
354 $ hg commit -m c_g 354 $ hg commit -m c_g
355 $ echo aaa > hhh 355 $ echo aaa > hhh
356 $ hg add hhh 356 $ hg add hhh
357 $ hg commit -m c_h 357 $ hg commit -m c_h
358 $ hg log -G 358 $ hg log -G
359 @ 10 default {foo} draft c_h 359 @ 11 default {foo} draft c_h
360 | 360 |
361 o 9 default {foo} draft c_g 361 o 10 default {foo} draft c_g
362 | 362 |
363 | o 8 default {foo} draft c_f 363 | o 9 default {foo} draft c_f
364 | | 364 | |
365 | o 7 default {foo} draft c_e 365 | o 8 default {foo} draft c_e
366 |/ 366 |/
367 o 6 default {foo} draft c_d 367 o 7 default {foo} draft c_d
368 | 368 |
369 o 2 default {foo} draft c_c 369 o 2 default {foo} draft c_c
370 | 370 |
371 o 1 default {} public c_b 371 o 1 default {} public c_b
372 | 372 |
376 Test output 376 Test output
377 377
378 $ hg top -l 378 $ hg top -l
379 ### topic: foo (2 heads) 379 ### topic: foo (2 heads)
380 ### target: default (branch) 380 ### target: default (branch)
381 t6@ c_h (current) 381 t6: c_f
382 t5: c_g 382 t5: c_e
383 t2^ c_d (base) 383 t2^ c_d (base)
384 t4: c_f 384 t4@ c_h (current)
385 t3: c_e 385 t3: c_g
386 t2: c_d 386 t2: c_d
387 t1: c_c 387 t1: c_c
388 t0^ c_b (base) 388 t0^ c_b (base)
389 389
390 Case with multiple heads on the topic with unstability involved 390 Case with multiple heads on the topic with unstability involved
395 $ hg up 'desc(c_d)' 395 $ hg up 'desc(c_d)'
396 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 396 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
397 $ echo ccc > ddd 397 $ echo ccc > ddd
398 $ hg commit --amend -m 'c_D' 398 $ hg commit --amend -m 'c_D'
399 $ hg rebase -d . -s 'desc(c_g)' 399 $ hg rebase -d . -s 'desc(c_g)'
400 rebasing 9:81264ae8a36a "c_g" 400 rebasing 10:81264ae8a36a "c_g"
401 rebasing 10:fde5f5941642 "c_h" 401 rebasing 11:fde5f5941642 "c_h"
402 $ hg log -G 402 $ hg log -G
403 o 13 default {foo} draft c_h 403 o 15 default {foo} draft c_h
404 | 404 |
405 o 12 default {foo} draft c_g 405 o 14 default {foo} draft c_g
406 | 406 |
407 @ 11 default {foo} draft c_D 407 @ 13 default {foo} draft c_D
408 | 408 |
409 | o 8 default {foo} draft c_f 409 | o 9 default {foo} draft c_f
410 | | 410 | |
411 | o 7 default {foo} draft c_e 411 | o 8 default {foo} draft c_e
412 | | 412 | |
413 | x 6 default {foo} draft c_d 413 | x 7 default {foo} draft c_d
414 |/ 414 |/
415 o 2 default {foo} draft c_c 415 o 2 default {foo} draft c_c
416 | 416 |
417 o 1 default {} public c_b 417 o 1 default {} public c_b
418 | 418 |
420 420
421 421
422 $ hg topic --list 422 $ hg topic --list
423 ### topic: foo (2 heads) 423 ### topic: foo (2 heads)
424 ### target: default (branch) 424 ### target: default (branch)
425 t6: c_h 425 t6$ c_f (unstable)
426 t5: c_g 426 t5$ c_e (unstable)
427 t2^ c_D (base current) 427 t2^ c_D (base current)
428 t4$ c_f (unstable) 428 t4: c_h
429 t3$ c_e (unstable) 429 t3: c_g
430 t2@ c_D (current) 430 t2@ c_D (current)
431 t1: c_c 431 t1: c_c
432 t0^ c_b (base) 432 t0^ c_b (base)
433 433
434 Trying to list non existing topic 434 Trying to list non existing topic
441 441
442 Complex cases where commits with same topic are not consecutive but are linear 442 Complex cases where commits with same topic are not consecutive but are linear
443 ============================================================================== 443 ==============================================================================
444 444
445 $ hg log --graph 445 $ hg log --graph
446 o 13 default {foo} draft c_h 446 o 15 default {foo} draft c_h
447 | 447 |
448 o 12 default {foo} draft c_g 448 o 14 default {foo} draft c_g
449 | 449 |
450 @ 11 default {foo} draft c_D 450 @ 13 default {foo} draft c_D
451 | 451 |
452 | o 8 default {foo} draft c_f 452 | o 9 default {foo} draft c_f
453 | | 453 | |
454 | o 7 default {foo} draft c_e 454 | o 8 default {foo} draft c_e
455 | | 455 | |
456 | x 6 default {foo} draft c_d 456 | x 7 default {foo} draft c_d
457 |/ 457 |/
458 o 2 default {foo} draft c_c 458 o 2 default {foo} draft c_c
459 | 459 |
460 o 1 default {} public c_b 460 o 1 default {} public c_b
461 | 461 |
462 o 0 default {} public c_a 462 o 0 default {} public c_a
463 463
464 Converting into a linear chain 464 Converting into a linear chain
465 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()' 465 $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()'
466 rebasing 7:215bc359096a "c_e" 466 rebasing 8:215bc359096a "c_e"
467 rebasing 8:ec9267b3f33f "c_f" 467 rebasing 9:ec9267b3f33f "c_f"
468 468
469 $ hg log -G 469 $ hg log -G
470 o 15 default {foo} draft c_f 470 o 17 default {foo} draft c_f
471 | 471 |
472 o 14 default {foo} draft c_e 472 o 16 default {foo} draft c_e
473 | 473 |
474 o 13 default {foo} draft c_h 474 o 15 default {foo} draft c_h
475 | 475 |
476 o 12 default {foo} draft c_g 476 o 14 default {foo} draft c_g
477 | 477 |
478 @ 11 default {foo} draft c_D 478 @ 13 default {foo} draft c_D
479 | 479 |
480 o 2 default {foo} draft c_c 480 o 2 default {foo} draft c_c
481 | 481 |
482 o 1 default {} public c_b 482 o 1 default {} public c_b
483 | 483 |
486 Changing topics on some commits in between 486 Changing topics on some commits in between
487 $ hg topic foobar -r 'desc(c_e) + desc(c_D)' 487 $ hg topic foobar -r 'desc(c_e) + desc(c_D)'
488 switching to topic foobar 488 switching to topic foobar
489 changed topic on 2 changes 489 changed topic on 2 changes
490 $ hg log -G 490 $ hg log -G
491 @ 17 default {foobar} draft c_D 491 @ 19 default {foobar} draft c_D
492 | 492 |
493 | o 16 default {foobar} draft c_e 493 | o 18 default {foobar} draft c_e
494 | | 494 | |
495 | | o 15 default {foo} draft c_f 495 | | o 17 default {foo} draft c_f
496 | | | 496 | | |
497 | | x 14 default {foo} draft c_e 497 | | x 16 default {foo} draft c_e
498 | |/ 498 | |/
499 | o 13 default {foo} draft c_h 499 | o 15 default {foo} draft c_h
500 | | 500 | |
501 | o 12 default {foo} draft c_g 501 | o 14 default {foo} draft c_g
502 | | 502 | |
503 | x 11 default {foo} draft c_D 503 | x 13 default {foo} draft c_D
504 |/ 504 |/
505 o 2 default {foo} draft c_c 505 o 2 default {foo} draft c_c
506 | 506 |
507 o 1 default {} public c_b 507 o 1 default {} public c_b
508 | 508 |
509 o 0 default {} public c_a 509 o 0 default {} public c_a
510 510
511 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()' 511 $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()'
512 rebasing 15:77082e55de88 "c_f" 512 rebasing 17:77082e55de88 "c_f"
513 switching to topic foo 513 switching to topic foo
514 switching to topic foobar 514 switching to topic foobar
515 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()' 515 $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()'
516 rebasing 12:0c3e8aed985d "c_g" 516 rebasing 14:0c3e8aed985d "c_g"
517 switching to topic foo 517 switching to topic foo
518 rebasing 13:b9e4f3709bc5 "c_h" 518 rebasing 15:b9e4f3709bc5 "c_h"
519 rebasing 16:4bc813530301 "c_e" 519 rebasing 18:4bc813530301 "c_e"
520 switching to topic foobar 520 switching to topic foobar
521 rebasing 18:4406ea4be852 "c_f" (tip) 521 rebasing 20:4406ea4be852 "c_f" (tip)
522 switching to topic foo 522 switching to topic foo
523 switching to topic foobar 523 switching to topic foobar
524 $ hg up 524 $ hg up
525 3 files updated, 0 files merged, 0 files removed, 0 files unresolved 525 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
526 $ hg log --graph 526 $ hg log --graph
527 o 22 default {foo} draft c_f 527 o 24 default {foo} draft c_f
528 | 528 |
529 @ 21 default {foobar} draft c_e 529 @ 23 default {foobar} draft c_e
530 | 530 |
531 o 20 default {foo} draft c_h 531 o 22 default {foo} draft c_h
532 | 532 |
533 o 19 default {foo} draft c_g 533 o 21 default {foo} draft c_g
534 | 534 |
535 o 17 default {foobar} draft c_D 535 o 19 default {foobar} draft c_D
536 | 536 |
537 o 2 default {foo} draft c_c 537 o 2 default {foo} draft c_c
538 | 538 |
539 o 1 default {} public c_b 539 o 1 default {} public c_b
540 | 540 |
854 examine changes to 'ggg'? [Ynesfdaq?] n 854 examine changes to 'ggg'? [Ynesfdaq?] n
855 855
856 Done splitting? [yN] y 856 Done splitting? [yN] y
857 857
858 $ hg --config extensions.evolve= obslog --all 858 $ hg --config extensions.evolve= obslog --all
859 o dde94df880e9 (21) c_G 859 o dde94df880e9 (22) c_G
860 | 860 |
861 | @ e7ea874afbd5 (22) c_G 861 | @ e7ea874afbd5 (23) c_G
862 |/ 862 |/
863 x b24bab30ac12 (20) c_G 863 x b24bab30ac12 (21) c_G
864 | rewritten(parent, content) as dde94df880e9, e7ea874afbd5 by test (Thu Jan 01 00:00:00 1970 +0000) 864 | rewritten(parent, content) as dde94df880e9, e7ea874afbd5 by test (Thu Jan 01 00:00:00 1970 +0000)
865 | 865 |
866 x 907f7d3c2333 (18) c_G 866 x 907f7d3c2333 (18) c_G
867 | rewritten as b24bab30ac12 by test (Thu Jan 01 00:00:00 1970 +0000) 867 | rewritten as b24bab30ac12 by test (Thu Jan 01 00:00:00 1970 +0000)
868 | 868 |