comparison tests/test-evolve.t @ 3936:537fd9a86c06 mercurial-4.3

test-compat: merge mercurial-4.4 into mercurial-4.3
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 03 Aug 2018 00:22:50 +0200
parents e5ba6531503e d00f0c369bc7
children 21eab0a99841
comparison
equal deleted inserted replaced
3935:9af0e2b0bdd7 3936:537fd9a86c06
325 325
326 This results in a new single changeset for our amended changeset, and the old 326 This results in a new single changeset for our amended changeset, and the old
327 changeset plus the updating changeset are hidden from view by default:: 327 changeset plus the updating changeset are hidden from view by default::
328 328
329 $ hg log 329 $ hg log
330 3 feature-B: another feature (child of 568a468b60fc) - test 330 4 feature-B: another feature (child of 568a468b60fc) - test
331 1 feature-A: a nifty feature - test 331 1 feature-A: a nifty feature - test
332 0 : base - test 332 0 : base - test
333 333
334 $ hg up feature-A -q 334 $ hg up feature-A -q
335 $ hg bookmark -i feature-A 335 $ hg bookmark -i feature-A
342 342
343 343
344 (amend of on ancestors) 344 (amend of on ancestors)
345 345
346 $ hg amend 346 $ hg amend
347 1 new orphan changesets 347 1 new unstable changesets
348 $ hg log 348 $ hg log
349 4 feature-A: a nifty feature - test 349 6 feature-A: a nifty feature - test
350 3 feature-B: another feature (child of 568a468b60fc) - test 350 4 feature-B: another feature (child of 568a468b60fc) - test
351 1 : a nifty feature - test 351 1 : a nifty feature - test
352 0 : base - test 352 0 : base - test
353 $ hg up -q 0 353 $ hg up -q 0
354 $ glog --hidden 354 $ glog --hidden
355 o 4:ba0ec09b1bab@default(draft) a nifty feature 355 o 6:ba0ec09b1bab@default(draft) a nifty feature
356 | 356 |
357 | o 3:6992c59c6b06@default(draft) another feature (child of 568a468b60fc) 357 | x 5:c296b79833d1@default(draft) temporary amend commit for 568a468b60fc
358 | | 358 | |
359 | | o 4:6992c59c6b06@default(draft) another feature (child of 568a468b60fc)
360 | |/
361 | | x 3:c97947cdc7a2@default(draft) temporary amend commit for 73296a82292a
362 | | |
359 | | x 2:73296a82292a@default(draft) another feature (child of 568a468b60fc) 363 | | x 2:73296a82292a@default(draft) another feature (child of 568a468b60fc)
360 | |/ 364 | |/
361 | x 1:568a468b60fc@default(draft) a nifty feature 365 | x 1:568a468b60fc@default(draft) a nifty feature
362 |/ 366 |/
363 @ 0:e55e0562ee93@default(public) base 367 @ 0:e55e0562ee93@default(public) base
364 368
365 $ hg debugobsolete 369 $ hg debugobsolete
366 73296a82292a76fb8a7061969d2489ec0d84cd5e 6992c59c6b06a1b4a92e24ff884829ae026d018b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} 370 73296a82292a76fb8a7061969d2489ec0d84cd5e 6992c59c6b06a1b4a92e24ff884829ae026d018b 0 (*) {'ef1': '8', 'user': 'test'} (glob)
367 568a468b60fc99a42d5d4ddbe181caff1eef308d ba0ec09b1babf3489b567853807f452edd46704f 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} 371 c97947cdc7a2a11cf78419f5c2c3dd3944ec79e8 0 {73296a82292a76fb8a7061969d2489ec0d84cd5e} (*) {'ef1': '0', 'user': 'test'} (glob)
372 568a468b60fc99a42d5d4ddbe181caff1eef308d ba0ec09b1babf3489b567853807f452edd46704f 0 (*) {'ef1': '8', 'user': 'test'} (glob)
373 c296b79833d1d497f33144786174bf35e04e44a3 0 {568a468b60fc99a42d5d4ddbe181caff1eef308d} (*) {'ef1': '0', 'user': 'test'} (glob)
368 $ hg evolve 374 $ hg evolve
369 move:[3] another feature (child of 568a468b60fc) 375 move:[4] another feature (child of 568a468b60fc)
370 atop:[4] a nifty feature 376 atop:[6] a nifty feature
371 merging main-file-1 377 merging main-file-1
372 working directory is now at 99833d22b0c6 378 working directory is now at 99833d22b0c6
373 $ hg log 379 $ hg log
374 5 feature-B: another feature (child of ba0ec09b1bab) - test 380 7 feature-B: another feature (child of ba0ec09b1bab) - test
375 4 feature-A: a nifty feature - test 381 6 feature-A: a nifty feature - test
376 0 : base - test 382 0 : base - test
377 383
378 Test commit -o options 384 Test commit -o options
379 385
380 $ hg up -r "desc('a nifty feature')" 386 $ hg up -r "desc('a nifty feature')"
381 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 387 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
382 $ hg revert -r "desc('another feature')" --all 388 $ hg revert -r "desc('another feature')" --all
383 adding file-from-B 389 adding file-from-B
384 reverting main-file-1 390 reverting main-file-1
385 $ sed -i'' -e s/Zwei/deux/ main-file-1 391 $ sed -i'' -e s/Zwei/deux/ main-file-1
386 $ hg commit -m 'another feature that rox' -o 5 392 $ hg commit -m 'another feature that rox' -o 7
387 created new head 393 created new head
388 $ hg log 394 $ hg log
389 6 feature-B: another feature that rox - test 395 8 feature-B: another feature that rox - test
390 4 feature-A: a nifty feature - test 396 6 feature-A: a nifty feature - test
391 0 : base - test 397 0 : base - test
392 398
393 phase change turning obsolete changeset public issue a bumped warning 399 phase change turning obsolete changeset public issue a bumped warning
394 400
395 $ hg phase --hidden --public 99833d22b0c6 401 $ hg phase --hidden --public 99833d22b0c6
396 1 new phase-divergent changesets 402 1 new bumped changesets
397 403
398 all solving bumped troubled 404 all solving bumped troubled
399 405
400 $ glog 406 $ hg log -G
401 @ 6:47d52a103155@default(draft) another feature that rox 407 @ 8 feature-B: another feature that rox - test
402 | 408 |
403 | o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 409 | o 7 : another feature (child of ba0ec09b1bab) - test
404 |/ 410 |/
405 o 4:ba0ec09b1bab@default(public) a nifty feature 411 o 6 feature-A: a nifty feature - test
406 | 412 |
407 o 0:e55e0562ee93@default(public) base 413 o 0 : base - test
408 414
409 $ hg evolve --any --traceback --phase-divergent 415 $ hg evolve --any --traceback --phase-divergent
410 recreate:[6] another feature that rox 416 recreate:[8] another feature that rox
411 atop:[5] another feature (child of ba0ec09b1bab) 417 atop:[7] another feature (child of ba0ec09b1bab)
412 computing new diff 418 computing new diff
413 committed as aca219761afb 419 committed as 6707c5e1c49d
414 working directory is now at aca219761afb 420 working directory is now at 6707c5e1c49d
415 $ glog 421 $ hg log -G
416 @ 7:aca219761afb@default(draft) phase-divergent update to 99833d22b0c6: 422 @ 9 feature-B: bumped update to 99833d22b0c6: - test
417 | 423 |
418 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 424 o 7 : another feature (child of ba0ec09b1bab) - test
419 | 425 |
420 o 4:ba0ec09b1bab@default(public) a nifty feature 426 o 6 feature-A: a nifty feature - test
421 | 427 |
422 o 0:e55e0562ee93@default(public) base 428 o 0 : base - test
423 429
424 $ hg diff --hidden -r aca219761afb -r 47d52a103155 430 $ hg diff --hidden -r 6707c5e1c49d -r 47d52a103155
425 $ hg diff -r aca219761afb^ -r aca219761afb 431 $ hg diff -r 6707c5e1c49d^ -r 6707c5e1c49d
426 diff --git a/main-file-1 b/main-file-1 432 diff --git a/main-file-1 b/main-file-1
427 --- a/main-file-1 433 --- a/main-file-1
428 +++ b/main-file-1 434 +++ b/main-file-1
429 @@ -3,1 +3,1 @@ 435 @@ -3,1 +3,1 @@
430 -Zwei 436 -Zwei
434 test evolve --all 440 test evolve --all
435 $ sed -i'' -e s/deux/to/ main-file-1 441 $ sed -i'' -e s/deux/to/ main-file-1
436 $ hg commit -m 'dansk 2!' 442 $ hg commit -m 'dansk 2!'
437 $ sed -i'' -e s/Three/tre/ main-file-1 443 $ sed -i'' -e s/Three/tre/ main-file-1
438 $ hg commit -m 'dansk 3!' 444 $ hg commit -m 'dansk 3!'
439 $ hg update aca219761afb 445 $ hg update 6707c5e1c49d
440 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 446 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 $ sed -i'' -e s/Un/Én/ main-file-1 447 $ sed -i'' -e s/Un/Én/ main-file-1
442 $ hg commit --amend -m 'dansk!' 448 $ hg commit --amend -m 'dansk!'
443 2 new orphan changesets 449 2 new unstable changesets
444 450
445 (ninja test for the {trouble} template: 451 (ninja test for the {trouble} template:
446 452
447 $ hg log -G --template '{rev} {troubles}\n' 453 $ hg log -G --template '{rev} {troubles}\n'
448 @ 10 454 @ 13
449 | 455 |
450 | o 9 orphan 456 | o 11 orphan
451 | | 457 | |
452 | o 8 orphan 458 | o 10 orphan
453 | | 459 | |
454 | x 7 460 | x 9
455 |/ 461 |/
456 o 5 462 o 7
457 | 463 |
458 o 4 464 o 6
459 | 465 |
460 o 0 466 o 0
461 467
462 468
463 469
464 (/ninja) 470 (/ninja)
465 471
466 $ hg evolve --all --traceback 472 $ hg evolve --all --traceback
467 move:[8] dansk 2! 473 move:[10] dansk 2!
468 atop:[10] dansk! 474 atop:[13] dansk!
469 merging main-file-1 475 merging main-file-1
470 move:[9] dansk 3! 476 move:[11] dansk 3!
471 atop:[11] dansk 2! 477 atop:[14] dansk 2!
472 merging main-file-1 478 merging main-file-1
473 working directory is now at 96abb1319a47 479 working directory is now at 68557e4f0048
474 $ hg log -G 480 $ hg log -G
475 @ 12 : dansk 3! - test 481 @ 15 : dansk 3! - test
476 | 482 |
477 o 11 : dansk 2! - test 483 o 14 : dansk 2! - test
478 | 484 |
479 o 10 feature-B: dansk! - test 485 o 13 feature-B: dansk! - test
480 | 486 |
481 o 5 : another feature (child of ba0ec09b1bab) - test 487 o 7 : another feature (child of ba0ec09b1bab) - test
482 | 488 |
483 o 4 feature-A: a nifty feature - test 489 o 6 feature-A: a nifty feature - test
484 | 490 |
485 o 0 : base - test 491 o 0 : base - test
486 492
487 493
488 $ cd .. 494 $ cd ..
506 $ hg clone -Ur 0 alpha beta 512 $ hg clone -Ur 0 alpha beta
507 adding changesets 513 adding changesets
508 adding manifests 514 adding manifests
509 adding file changes 515 adding file changes
510 added 1 changesets with 1 changes to 1 files 516 added 1 changesets with 1 changes to 1 files
511 new changesets 702e4d0a6d86
512 $ cd alpha 517 $ cd alpha
513 518
514 $ cat << EOF > A 519 $ cat << EOF > A
515 > We 520 > We
516 > need 521 > need
539 $ hg verify 544 $ hg verify
540 checking changesets 545 checking changesets
541 checking manifests 546 checking manifests
542 crosschecking files in changesets and manifests 547 crosschecking files in changesets and manifests
543 checking files 548 checking files
544 3 files, 3 changesets, 3 total revisions 549 3 files, 4 changesets, 4 total revisions
545 $ hg --config extensions.hgext.mq= strip 'extinct()' 550 $ hg --config extensions.hgext.mq= strip 'extinct()'
546 abort: empty revision set 551 abort: empty revision set
547 [255] 552 [255]
548 (do some garbare collection) 553 (do some garbare collection)
549 $ hg --config extensions.hgext.mq= strip --hidden 'extinct()' --config devel.strip-obsmarkers=no 554 $ hg --config extensions.hgext.mq= strip --hidden 'extinct()' --config devel.strip-obsmarkers=no
550 saved backup bundle to $TESTTMP/alpha/.hg/strip-backup/e87767087a57-a365b072-backup.hg (glob) 555 saved backup bundle to $TESTTMP/alpha/.hg/strip-backup/e87767087a57-d7bd82e9-backup.hg (glob)
551 $ hg verify 556 $ hg verify
552 checking changesets 557 checking changesets
553 checking manifests 558 checking manifests
554 crosschecking files in changesets and manifests 559 crosschecking files in changesets and manifests
555 checking files 560 checking files
564 searching for changes 569 searching for changes
565 adding changesets 570 adding changesets
566 adding manifests 571 adding manifests
567 adding file changes 572 adding file changes
568 added 1 changesets with 1 changes to 1 files 573 added 1 changesets with 1 changes to 1 files
569 1 new obsolescence markers 574 2 new obsolescence markers
570 new changesets c6dda801837c
571 (run 'hg update' to get a working copy) 575 (run 'hg update' to get a working copy)
572 $ hg up 576 $ hg up
573 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 577 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
574 578
575 $ cd .. 579 $ cd ..
616 | o 1:73d38bb17fd7@default(draft) add 1 620 | o 1:73d38bb17fd7@default(draft) add 1
617 |/ 621 |/
618 o 0:8685c6d34325@default(draft) add 0 622 o 0:8685c6d34325@default(draft) add 0
619 623
620 $ hg debugobsolete 624 $ hg debugobsolete
621 0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 fa455b5098e0ce8c1871edf6369f32be7d8b4d1c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'grab', 'user': 'test'} 625 0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 fa455b5098e0ce8c1871edf6369f32be7d8b4d1c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'user': 'test'}
622 db038628b9e56f51a454c0da0c508df247b41748 417185465d2c68e575cff4cd6ed8a4047505ef24 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} 626 db038628b9e56f51a454c0da0c508df247b41748 417185465d2c68e575cff4cd6ed8a4047505ef24 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'user': 'test'}
623 627
624 Test grab --continue 628 Test grab --continue
625 629
626 $ hg up -qC 0 630 $ hg up -qC 0
627 $ echo 2 > 1 631 $ echo 2 > 1
659 | o 1:73d38bb17fd7@default(draft) add 1 663 | o 1:73d38bb17fd7@default(draft) add 1
660 |/ 664 |/
661 o 0:8685c6d34325@default(draft) add 0 665 o 0:8685c6d34325@default(draft) add 0
662 666
663 $ hg debugobsolete 667 $ hg debugobsolete
664 0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 fa455b5098e0ce8c1871edf6369f32be7d8b4d1c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'grab', 'user': 'test'} 668 0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9 fa455b5098e0ce8c1871edf6369f32be7d8b4d1c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'user': 'test'}
665 db038628b9e56f51a454c0da0c508df247b41748 417185465d2c68e575cff4cd6ed8a4047505ef24 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'prune', 'user': 'test'} 669 db038628b9e56f51a454c0da0c508df247b41748 417185465d2c68e575cff4cd6ed8a4047505ef24 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'user': 'test'}
666 a5bfd90a2f29c7ccb8f917ff4e5013a9053d0a04 fb2c0f0a0c54be4367988521bad2cbd33a540969 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'operation': 'grab', 'user': 'test'} 670 a5bfd90a2f29c7ccb8f917ff4e5013a9053d0a04 fb2c0f0a0c54be4367988521bad2cbd33a540969 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '12', 'user': 'test'}
667 671
668 Test touch 672 Test touch
669 673
670 $ glog 674 $ glog
671 @ 8:fb2c0f0a0c54@default(draft) conflict 675 @ 8:fb2c0f0a0c54@default(draft) conflict
764 768
765 $ hg olog | head -n 10 # hg touch makes the output unstable (fix it with devel option for more stable touch) 769 $ hg olog | head -n 10 # hg touch makes the output unstable (fix it with devel option for more stable touch)
766 @ d26d339c513f (12) add 4 770 @ d26d339c513f (12) add 4
767 |\ 771 |\
768 x | ce341209337f (4) add 4 772 x | ce341209337f (4) add 4
769 / rewritten(description, user, content) as d26d339c513f using fold by test (Thu Jan 01 00:00:00 1970 +0000) 773 / rewritten(description, user, content) as d26d339c513f by test (Thu Jan 01 00:00:00 1970 +0000)
770 | 774 |
771 x cf0c3904643c (11) add 3 775 x cf0c3904643c (11) add 3
772 |\ rewritten(description, user, parent, content) as d26d339c513f using fold by test (Thu Jan 01 00:00:00 1970 +0000) 776 |\ rewritten(description, user, parent, content) as d26d339c513f by test (Thu Jan 01 00:00:00 1970 +0000)
773 | | 777 | |
774 | \ 778 | \
775 | |\ 779 | |\
776 780
777 Test obsstore stat 781 Test obsstore stat
784 1 successors: 10 788 1 successors: 10
785 2 successors: 0 789 2 successors: 0
786 more than 2 successors: 0 790 more than 2 successors: 0
787 available keys: 791 available keys:
788 ef1: 10 792 ef1: 10
789 operation: 10
790 user: 10 793 user: 10
791 marker size: 794 marker size:
792 format v1: 795 format v1:
793 smallest length: 90
794 longer length: 92
795 median length: 91
796 mean length: 90
797 format v0:
798 smallest length: * (glob) 796 smallest length: * (glob)
799 longer length: * (glob) 797 longer length: * (glob)
800 median length: * (glob) 798 median length: * (glob)
801 mean length: * (glob) 799 mean length: * (glob)
800 format v0:
801 smallest length: 72
802 longer length: 73
803 median length: 73
804 mean length: 72
802 disconnected clusters: 1 805 disconnected clusters: 1
803 any known node: 1 806 any known node: 1
804 smallest length: 10 807 smallest length: 10
805 longer length: 10 808 longer length: 10
806 median length: 10 809 median length: 10
826 adding b 829 adding b
827 $ hg mv a c 830 $ hg mv a c
828 $ hg ci -m c 831 $ hg ci -m c
829 $ hg prune .^ 832 $ hg prune .^
830 1 changesets pruned 833 1 changesets pruned
831 1 new orphan changesets 834 1 new unstable changesets
832 $ hg stab --any 835 $ hg stab --any
833 move:[15] c 836 move:[15] c
834 atop:[13] a 837 atop:[13] a
835 working directory is now at 3742bde73477 838 working directory is now at 3742bde73477
836 $ hg st -C --change=tip 839 $ hg st -C --change=tip
843 $ cd ../work 846 $ cd ../work
844 $ hg fold --from .^ --message "Folding with custom commit message" 847 $ hg fold --from .^ --message "Folding with custom commit message"
845 2 changesets folded 848 2 changesets folded
846 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 849 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
847 $ glog 850 $ glog
848 @ 13:284c0d45770d@default(draft) Folding with custom commit message 851 @ 16:98cb758db56d@default(draft) Folding with custom commit message
849 | 852 |
850 o 10:9975c016fe7b@default(draft) dansk! 853 o 13:0a2f9b959bb4@default(draft) dansk!
851 | 854 |
852 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 855 o 7:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
853 | 856 |
854 o 4:ba0ec09b1bab@default(public) a nifty feature 857 o 6:ba0ec09b1bab@default(public) a nifty feature
855 | 858 |
856 o 0:e55e0562ee93@default(public) base 859 o 0:e55e0562ee93@default(public) base
857 860
858 $ cat > commit-message <<EOF 861 $ cat > commit-message <<EOF
859 > A longer 862 > A longer
862 865
863 $ hg fold --from .^ --logfile commit-message 866 $ hg fold --from .^ --logfile commit-message
864 2 changesets folded 867 2 changesets folded
865 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 868 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
866 $ hg qlog 869 $ hg qlog
867 14 - 8693d0f277b8 A longer 870 17 - a00182c58888 A longer
868 commit message (draft) 871 commit message (draft)
869 5 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public) 872 7 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public)
870 4 - ba0ec09b1bab a nifty feature (public) 873 6 - ba0ec09b1bab a nifty feature (public)
871 0 - e55e0562ee93 base (public) 874 0 - e55e0562ee93 base (public)
872 875
873 $ cd .. 876 $ cd ..
874 877
875 Test branch preservation: 878 Test branch preservation:
903 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 906 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
904 $ hg branch mybranch 907 $ hg branch mybranch
905 marked working directory as branch mybranch 908 marked working directory as branch mybranch
906 (branches are permanent and global, did you want a bookmark?) 909 (branches are permanent and global, did you want a bookmark?)
907 $ hg amend 910 $ hg amend
908 1 new orphan changesets 911 1 new unstable changesets
909 912
910 $ hg evolve 913 $ hg evolve
911 move:[3] a3 914 move:[3] a3
912 atop:[4] a2 915 atop:[5] a2
913 working directory is now at 7c5649f73d11 916 working directory is now at 7c5649f73d11
914 917
915 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 918 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
916 @ 5 [mybranch] a3 919 @ 6 [mybranch] a3
917 | 920 |
918 o 4 [mybranch] a2 921 o 5 [mybranch] a2
919 | 922 |
920 o 1 [default] a1 923 o 1 [default] a1
921 | 924 |
922 o 0 [default] a0 925 o 0 [default] a0
923 926
925 branch change preserved 928 branch change preserved
926 929
927 $ hg up 'desc(a1)' 930 $ hg up 'desc(a1)'
928 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 931 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
929 $ hg amend -m 'a1_' 932 $ hg amend -m 'a1_'
930 2 new orphan changesets 933 2 new unstable changesets
931 $ hg evolve 934 $ hg evolve
932 move:[4] a2 935 move:[5] a2
933 atop:[6] a1_ 936 atop:[7] a1_
934 working directory is now at eb07e22a0e63 937 working directory is now at eb07e22a0e63
935 $ hg evolve 938 $ hg evolve
936 move:[5] a3 939 move:[6] a3
937 atop:[7] a2 940 atop:[8] a2
938 working directory is now at 777c26ca5e78 941 working directory is now at 777c26ca5e78
939 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 942 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
940 @ 8 [mybranch] a3 943 @ 9 [mybranch] a3
941 | 944 |
942 o 7 [mybranch] a2 945 o 8 [mybranch] a2
943 | 946 |
944 o 6 [default] a1_ 947 o 7 [default] a1_
945 | 948 |
946 o 0 [default] a0 949 o 0 [default] a0
947 950
948 951
949 Evolve from the middle of a stack pick the right changesets. 952 Evolve from the middle of a stack pick the right changesets.
950 953
951 $ hg up -r "desc('a1_')" 954 $ hg up -r "desc('a1_')"
952 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 955 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
953 $ hg ci --amend -m 'a1__' 956 $ hg ci --amend -m 'a1__'
954 2 new orphan changesets 957 2 new unstable changesets
955 958
956 $ hg up -r "desc('a2')" 959 $ hg up -r "desc('a2')"
957 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 960 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
958 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 961 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
959 o 9 [default] a1__ 962 o 10 [default] a1__
960 | 963 |
961 | o 8 [mybranch] a3 964 | o 9 [mybranch] a3
962 | | 965 | |
963 | @ 7 [mybranch] a2 966 | @ 8 [mybranch] a2
964 | | 967 | |
965 | x 6 [default] a1_ 968 | x 7 [default] a1_
966 |/ 969 |/
967 o 0 [default] a0 970 o 0 [default] a0
968 971
969 $ hg evolve 972 $ hg evolve
970 nothing to evolve on current working copy parent 973 nothing to evolve on current working copy parent
979 $ hg bookmark testbookmark 982 $ hg bookmark testbookmark
980 $ ls .hg/bookmarks* 983 $ ls .hg/bookmarks*
981 .hg/bookmarks 984 .hg/bookmarks
982 .hg/bookmarks.* (glob) 985 .hg/bookmarks.* (glob)
983 $ hg evolve 986 $ hg evolve
984 move:[7] a2 987 move:[8] a2
985 atop:[9] a1__ 988 atop:[10] a1__
986 (leaving bookmark testbookmark) 989 (leaving bookmark testbookmark)
987 working directory is now at d952e93add6f 990 working directory is now at d952e93add6f
988 $ ls .hg/bookmarks* 991 $ ls .hg/bookmarks*
989 .hg/bookmarks 992 .hg/bookmarks
990 $ glog 993 $ glog
991 @ 10:d952e93add6f@mybranch(draft) a2 994 @ 11:d952e93add6f@mybranch(draft) a2
992 | 995 |
993 o 9:9f8b83c2e7f3@default(draft) a1__ 996 o 10:9f8b83c2e7f3@default(draft) a1__
994 | 997 |
995 | o 8:777c26ca5e78@mybranch(draft) a3 998 | o 9:777c26ca5e78@mybranch(draft) a3
996 | | 999 | |
997 | x 7:eb07e22a0e63@mybranch(draft) a2 1000 | x 8:eb07e22a0e63@mybranch(draft) a2
998 | | 1001 | |
999 | x 6:faafc6cea0ba@default(draft) a1_ 1002 | x 7:faafc6cea0ba@default(draft) a1_
1000 |/ 1003 |/
1001 o 0:07c1c36d9ef0@default(draft) a0 1004 o 0:07c1c36d9ef0@default(draft) a0
1002 1005
1003 1006
1004 Possibility to select what trouble to solve first, asking for bumped before 1007 Possibility to select what trouble to solve first, asking for bumped before
1006 $ hg up -r "desc('a1__')" 1009 $ hg up -r "desc('a1__')"
1007 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1010 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1008 $ hg revert -r d952e93add6f --all 1011 $ hg revert -r d952e93add6f --all
1009 reverting a 1012 reverting a
1010 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 1013 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
1011 o 10 [mybranch] a2 1014 o 11 [mybranch] a2
1012 | 1015 |
1013 @ 9 [default] a1__ 1016 @ 10 [default] a1__
1014 | 1017 |
1015 | o 8 [mybranch] a3 1018 | o 9 [mybranch] a3
1016 | | 1019 | |
1017 | x 7 [mybranch] a2 1020 | x 8 [mybranch] a2
1018 | | 1021 | |
1019 | x 6 [default] a1_ 1022 | x 7 [default] a1_
1020 |/ 1023 |/
1021 o 0 [default] a0 1024 o 0 [default] a0
1022 1025
1023 $ echo "hello world" > newfile 1026 $ echo "hello world" > newfile
1024 $ hg add newfile 1027 $ hg add newfile
1025 $ hg commit -m "add new file bumped" -o 10 1028 $ hg commit -m "add new file bumped" -o 11
1026 $ hg phase --public --hidden d952e93add6f 1029 $ hg phase --public --hidden d952e93add6f
1027 1 new phase-divergent changesets 1030 1 new bumped changesets
1028 $ hg log -G 1031 $ hg log -G
1029 @ 11 : add new file bumped - test 1032 @ 12 : add new file bumped - test
1030 | 1033 |
1031 | o 10 : a2 - test 1034 | o 11 : a2 - test
1032 |/ 1035 |/
1033 o 9 testbookmark: a1__ - test 1036 o 10 testbookmark: a1__ - test
1034 | 1037 |
1035 | o 8 : a3 - test 1038 | o 9 : a3 - test
1036 | | 1039 | |
1037 | x 7 : a2 - test 1040 | x 8 : a2 - test
1038 | | 1041 | |
1039 | x 6 : a1_ - test 1042 | x 7 : a1_ - test
1040 |/ 1043 |/
1041 o 0 : a0 - test 1044 o 0 : a0 - test
1042 1045
1043 1046
1044 Now we have a bumped and an unstable changeset, we solve the bumped first 1047 Now we have a bumped and an unstable changeset, we solve the bumped first
1045 normally the unstable changeset would be solve first 1048 normally the unstable changeset would be solve first
1046 1049
1047 $ hg log -G 1050 $ hg log -G
1048 @ 11 : add new file bumped - test 1051 @ 12 : add new file bumped - test
1049 | 1052 |
1050 | o 10 : a2 - test 1053 | o 11 : a2 - test
1051 |/ 1054 |/
1052 o 9 testbookmark: a1__ - test 1055 o 10 testbookmark: a1__ - test
1053 | 1056 |
1054 | o 8 : a3 - test 1057 | o 9 : a3 - test
1055 | | 1058 | |
1056 | x 7 : a2 - test 1059 | x 8 : a2 - test
1057 | | 1060 | |
1058 | x 6 : a1_ - test 1061 | x 7 : a1_ - test
1059 |/ 1062 |/
1060 o 0 : a0 - test 1063 o 0 : a0 - test
1061 1064
1062 $ hg evolve -r "desc('add new file bumped')" --phase-divergent 1065 $ hg evolve -r "desc('add new file bumped')" --phase-divergent
1063 recreate:[11] add new file bumped 1066 recreate:[12] add new file bumped
1064 atop:[10] a2 1067 atop:[11] a2
1065 computing new diff 1068 computing new diff
1066 committed as a8bb31d4b7f2 1069 committed as f15d32934071
1067 working directory is now at a8bb31d4b7f2 1070 working directory is now at f15d32934071
1068 $ hg evolve --any 1071 $ hg evolve --any
1069 move:[8] a3 1072 move:[9] a3
1070 atop:[12] phase-divergent update to d952e93add6f: 1073 atop:[13] bumped update to d952e93add6f:
1071 working directory is now at b88539ad24d7 1074 working directory is now at cce26b684bfe
1072 $ glog
1073 @ 13:b88539ad24d7@default(draft) a3
1074 |
1075 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f:
1076 |
1077 o 10:d952e93add6f@mybranch(public) a2
1078 |
1079 o 9:9f8b83c2e7f3@default(public) a1__
1080 |
1081 o 0:07c1c36d9ef0@default(public) a0
1082
1083
1084 Check that we can resolve troubles in a revset with more than one commit 1075 Check that we can resolve troubles in a revset with more than one commit
1085 $ hg up b88539ad24d7 -C 1076 $ hg up cce26b684bfe -C
1086 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1077 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1087 $ mkcommit gg 1078 $ mkcommit gg
1088 $ hg up b88539ad24d7 1079 $ hg up cce26b684bfe
1089 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 1080 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1090 $ mkcommit gh 1081 $ mkcommit gh
1091 created new head 1082 created new head
1092 $ hg up b88539ad24d7 1083 $ hg up cce26b684bfe
1093 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 1084 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1094 $ printf "newline\nnewline\n" >> a 1085 $ printf "newline\nnewline\n" >> a
1095 $ hg log -G 1086 $ hg log -G
1096 o 15 : add gh - test 1087 o 16 : add gh - test
1097 | 1088 |
1098 | o 14 : add gg - test 1089 | o 15 : add gg - test
1099 |/ 1090 |/
1100 @ 13 : a3 - test 1091 @ 14 : a3 - test
1101 | 1092 |
1102 o 12 : phase-divergent update to d952e93add6f: - test 1093 o 13 : bumped update to d952e93add6f: - test
1103 | 1094 |
1104 o 10 : a2 - test 1095 o 11 : a2 - test
1105 | 1096 |
1106 o 9 testbookmark: a1__ - test 1097 o 10 testbookmark: a1__ - test
1107 | 1098 |
1108 o 0 : a0 - test 1099 o 0 : a0 - test
1109 1100
1110 $ hg amend 1101 $ hg amend
1111 2 new orphan changesets 1102 2 new unstable changesets
1112 $ glog 1103 $ hg log -G
1113 @ 16:0cf3707e8971@default(draft) a3 1104 @ 18 : a3 - test
1114 | 1105 |
1115 | o 15:daa1ff1c7fbd@default(draft) add gh 1106 | o 16 : add gh - test
1116 | | 1107 | |
1117 | | o 14:484fb3cfa7f2@default(draft) add gg 1108 | | o 15 : add gg - test
1118 | |/ 1109 | |/
1119 | x 13:b88539ad24d7@default(draft) a3 1110 | x 14 : a3 - test
1120 |/ 1111 |/
1121 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: 1112 o 13 : bumped update to d952e93add6f: - test
1122 | 1113 |
1123 o 10:d952e93add6f@mybranch(public) a2 1114 o 11 : a2 - test
1124 | 1115 |
1125 o 9:9f8b83c2e7f3@default(public) a1__ 1116 o 10 testbookmark: a1__ - test
1126 | 1117 |
1127 o 0:07c1c36d9ef0@default(public) a0 1118 o 0 : a0 - test
1128 1119
1129 1120
1130 Evolving an empty revset should do nothing 1121 Evolving an empty revset should do nothing
1131 $ hg evolve --rev "daa1ff1c7fbd and 484fb3cfa7f2" 1122 $ hg evolve --rev "beb41503aa3e and 27247fcb2df6"
1132 set of specified revisions is empty 1123 set of specified revisions is empty
1133 [1] 1124 [1]
1134 1125
1135 $ hg evolve --rev "b88539ad24d7::" --phase-divergent 1126 $ hg evolve --rev "cce26b684bfe::" --phase-divergent
1136 no phasedivergent changesets in specified revisions 1127 no phasedivergent changesets in specified revisions
1137 (do you want to use --orphan) 1128 (do you want to use --orphan)
1138 [2] 1129 [2]
1139 $ hg evolve --rev "b88539ad24d7::" --orphan 1130 $ hg evolve --rev "cce26b684bfe::" --orphan
1140 move:[14] add gg 1131 move:[15] add gg
1141 atop:[16] a3 1132 atop:[18] a3
1142 move:[15] add gh 1133 move:[16] add gh
1143 atop:[16] a3 1134 atop:[18] a3
1144 working directory is now at 0c049e4e5422 1135 working directory is now at e02107f98737
1145 $ glog 1136 $ hg log -G
1146 @ 18:0c049e4e5422@default(draft) add gh 1137 @ 20 : add gh - test
1147 | 1138 |
1148 | o 17:98e171e2f272@default(draft) add gg 1139 | o 19 : add gg - test
1149 |/ 1140 |/
1150 o 16:0cf3707e8971@default(draft) a3 1141 o 18 : a3 - test
1151 | 1142 |
1152 o 12:a8bb31d4b7f2@default(draft) phase-divergent update to d952e93add6f: 1143 o 13 : bumped update to d952e93add6f: - test
1153 | 1144 |
1154 o 10:d952e93add6f@mybranch(public) a2 1145 o 11 : a2 - test
1155 | 1146 |
1156 o 9:9f8b83c2e7f3@default(public) a1__ 1147 o 10 testbookmark: a1__ - test
1157 | 1148 |
1158 o 0:07c1c36d9ef0@default(public) a0 1149 o 0 : a0 - test
1159 1150
1160 Enabling commands selectively, no command enabled, next and fold and unknown 1151 Enabling commands selectively, no command enabled, next and fold and unknown
1161 $ cat >> $HGRCPATH <<EOF 1152 $ cat >> $HGRCPATH <<EOF
1162 > [experimental] 1153 > [experimental]
1163 > evolution=createmarkers 1154 > evolution=createmarkers
1252 [255] 1243 [255]
1253 1244
1254 Shows "use 'hg evolve' to..." hints iff the evolve command is enabled 1245 Shows "use 'hg evolve' to..." hints iff the evolve command is enabled
1255 1246
1256 $ hg --hidden up 14 1247 $ hg --hidden up 14
1257 2 files updated, 0 files merged, 1 files removed, 0 files unresolved 1248 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1258 working directory parent is obsolete! (484fb3cfa7f2) 1249 working directory parent is obsolete! (cce26b684bfe)
1259 $ cat >> $HGRCPATH <<EOF 1250 $ cat >> $HGRCPATH <<EOF
1260 > [experimental] 1251 > [experimental]
1261 > evolutioncommands=evolve 1252 > evolutioncommands=evolve
1262 > EOF 1253 > EOF
1263 $ hg --hidden up 15 1254 $ hg --hidden up 15
1264 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 1255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1265 working directory parent is obsolete! (daa1ff1c7fbd) 1256 working directory parent is obsolete! (27247fcb2df6)
1266 (use 'hg evolve' to update to its successor: 0c049e4e5422) 1257 (use 'hg evolve' to update to its successor: 24e63b319adf)
1267 1258
1268 Restore all of the evolution features 1259 Restore all of the evolution features
1269 1260
1270 $ cat >> $HGRCPATH <<EOF 1261 $ cat >> $HGRCPATH <<EOF
1271 > [experimental] 1262 > [experimental]
1272 > evolution=all 1263 > evolution=all
1273 > EOF 1264 > EOF
1274 1265
1275 Check hg evolve --rev on singled out commit 1266 Check hg evolve --rev on singled out commit
1276 $ hg up 98e171e2f272 -C 1267 $ hg up 24e63b319adf -C
1277 2 files updated, 0 files merged, 1 files removed, 0 files unresolved 1268 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1278 $ mkcommit j1 1269 $ mkcommit j1
1279 $ mkcommit j2 1270 $ mkcommit j2
1280 $ mkcommit j3 1271 $ mkcommit j3
1281 $ hg up .^^ 1272 $ hg up .^^
1282 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1273 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1283 $ echo "hello" > j4 1274 $ echo "hello" > j4
1284 $ hg add j4 1275 $ hg add j4
1285 $ hg amend 1276 $ hg amend
1286 2 new orphan changesets 1277 2 new unstable changesets
1287 $ glog -r "0cf3707e8971::" 1278 $ glog -r "edc3c9de504e::"
1288 @ 22:274b6cd0c101@default(draft) add j1 1279 @ 25:8dc373be86d9@default(draft) add j1
1289 | 1280 |
1290 | o 21:89e4f7e8feb5@default(draft) add j3 1281 | o 23:d7eadcf6eccd@default(draft) add j3
1291 | | 1282 | |
1292 | o 20:4cd61236beca@default(draft) add j2 1283 | o 22:2223ea564144@default(draft) add j2
1293 | | 1284 | |
1294 | x 19:0fd8bfb02de4@default(draft) add j1 1285 | x 21:48490698b269@default(draft) add j1
1295 |/ 1286 |/
1296 | o 18:0c049e4e5422@default(draft) add gh 1287 | o 20:e02107f98737@default(draft) add gh
1297 | | 1288 | |
1298 o | 17:98e171e2f272@default(draft) add gg 1289 o | 19:24e63b319adf@default(draft) add gg
1299 |/ 1290 |/
1300 o 16:0cf3707e8971@default(draft) a3 1291 o 18:edc3c9de504e@default(draft) a3
1301 | 1292 |
1302 ~ 1293 ~
1303 1294
1304 $ hg evolve --rev 89e4f7e8feb5 --any 1295 $ hg evolve --rev d7eadcf6eccd --any
1305 abort: cannot specify both "--rev" and "--any" 1296 abort: cannot specify both "--rev" and "--any"
1306 [255] 1297 [255]
1307 $ hg evolve --rev 89e4f7e8feb5 1298 $ hg evolve --rev d7eadcf6eccd
1308 cannot solve instability of 89e4f7e8feb5, skipping 1299 cannot solve instability of d7eadcf6eccd, skipping
1309 1300
1310 Check that uncommit respects the allowunstable option 1301 Check that uncommit respects the allowunstable option
1311 With only createmarkers we can only uncommit on a head 1302 With only createmarkers we can only uncommit on a head
1312 $ cat >> $HGRCPATH <<EOF 1303 $ cat >> $HGRCPATH <<EOF
1313 > [experimental] 1304 > [experimental]
1314 > evolution=createmarkers, allnewcommands 1305 > evolution=createmarkers, allnewcommands
1315 > EOF 1306 > EOF
1316 $ hg up 274b6cd0c101^ 1307 $ hg up 8dc373be86d9^
1317 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1308 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1318 $ hg uncommit --all 1309 $ hg uncommit --all
1319 abort: uncommit will orphan 4 descendants 1310 abort: uncommit will orphan 4 descendants
1320 (see 'hg help evolution.instability') 1311 (see 'hg help evolution.instability')
1321 [255] 1312 [255]
1322 $ hg up 274b6cd0c101 1313 $ hg up 8dc373be86d9
1323 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 1314 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1324 $ hg uncommit --all 1315 $ hg uncommit --all
1325 new changeset is empty 1316 new changeset is empty
1326 (use 'hg prune .' to remove it) 1317 (use 'hg prune .' to remove it)
1327 $ glog -r "0cf3707e8971::" 1318 $ glog -r "edc3c9de504e::"
1328 @ 23:0ef9ff75f8e2@default(draft) add j1 1319 @ 26:044804d0c10d@default(draft) add j1
1329 | 1320 |
1330 | o 21:89e4f7e8feb5@default(draft) add j3 1321 | o 23:d7eadcf6eccd@default(draft) add j3
1331 | | 1322 | |
1332 | o 20:4cd61236beca@default(draft) add j2 1323 | o 22:2223ea564144@default(draft) add j2
1333 | | 1324 | |
1334 | x 19:0fd8bfb02de4@default(draft) add j1 1325 | x 21:48490698b269@default(draft) add j1
1335 |/ 1326 |/
1336 | o 18:0c049e4e5422@default(draft) add gh 1327 | o 20:e02107f98737@default(draft) add gh
1337 | | 1328 | |
1338 o | 17:98e171e2f272@default(draft) add gg 1329 o | 19:24e63b319adf@default(draft) add gg
1339 |/ 1330 |/
1340 o 16:0cf3707e8971@default(draft) a3 1331 o 18:edc3c9de504e@default(draft) a3
1341 | 1332 |
1342 ~ 1333 ~
1343 1334
1344 Check that prune respects the allowunstable option 1335 Check that prune respects the allowunstable option
1345 $ hg up -C . 1336 $ hg up -C .
1346 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 1337 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1347 $ hg up 0c049e4e5422 1338 $ hg up e02107f98737
1348 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 1339 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1349 $ hg evolve --all 1340 $ hg evolve --all
1350 nothing to evolve on current working copy parent 1341 nothing to evolve on current working copy parent
1351 (2 other orphan in the repository, do you want --any or --rev) 1342 (2 other orphan in the repository, do you want --any or --rev)
1352 [2] 1343 [2]
1353 $ hg evolve --all --any 1344 $ hg evolve --all --any
1354 move:[20] add j2 1345 move:[22] add j2
1355 atop:[23] add j1 1346 atop:[26] add j1
1356 move:[21] add j3 1347 move:[23] add j3
1357 atop:[24] add j2 1348 atop:[27] add j2
1358 working directory is now at 0d9203b74542 1349 working directory is now at c9a20e2d74aa
1359 $ glog -r "0cf3707e8971::" 1350 $ glog -r "edc3c9de504e::"
1360 @ 25:0d9203b74542@default(draft) add j3 1351 @ 28:c9a20e2d74aa@default(draft) add j3
1361 | 1352 |
1362 o 24:f1b85956c48c@default(draft) add j2 1353 o 27:b0e3066231e2@default(draft) add j2
1363 | 1354 |
1364 o 23:0ef9ff75f8e2@default(draft) add j1 1355 o 26:044804d0c10d@default(draft) add j1
1365 | 1356 |
1366 | o 18:0c049e4e5422@default(draft) add gh 1357 | o 20:e02107f98737@default(draft) add gh
1367 | | 1358 | |
1368 o | 17:98e171e2f272@default(draft) add gg 1359 o | 19:24e63b319adf@default(draft) add gg
1369 |/ 1360 |/
1370 o 16:0cf3707e8971@default(draft) a3 1361 o 18:edc3c9de504e@default(draft) a3
1371 | 1362 |
1372 ~ 1363 ~
1373 $ hg up 98e171e2f272 1364 $ hg up 19
1374 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1365 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1375 $ mkcommit c5_ 1366 $ mkcommit c5_
1376 created new head 1367 created new head
1377 $ hg prune '0ef9ff75f8e2 + f1b85956c48c' 1368 $ hg prune '044804d0c10d + b0e3066231e2'
1378 abort: touch will orphan 1 descendants 1369 abort: touch will orphan 1 descendants
1379 (see 'hg help evolution.instability') 1370 (see 'hg help evolution.instability')
1380 [255] 1371 [255]
1381 $ hg prune '98e171e2f272::0d9203b74542' 1372 $ hg prune '24e63b319adf::c9a20e2d74aa'
1382 abort: touch will orphan 1 descendants 1373 abort: touch will orphan 1 descendants
1383 (see 'hg help evolution.instability') 1374 (see 'hg help evolution.instability')
1384 [255] 1375 [255]
1385 $ hg prune '0ef9ff75f8e2::' 1376 $ hg prune '044804d0c10d::'
1386 3 changesets pruned 1377 3 changesets pruned
1387 $ glog -r "0cf3707e8971::" 1378 $ glog -r "edc3c9de504e::"
1388 @ 26:4c6f6f6d1976@default(draft) add c5_ 1379 @ 29:2251801b6c91@default(draft) add c5_
1389 | 1380 |
1390 | o 18:0c049e4e5422@default(draft) add gh 1381 | o 20:e02107f98737@default(draft) add gh
1391 | | 1382 | |
1392 o | 17:98e171e2f272@default(draft) add gg 1383 o | 19:24e63b319adf@default(draft) add gg
1393 |/ 1384 |/
1394 o 16:0cf3707e8971@default(draft) a3 1385 o 18:edc3c9de504e@default(draft) a3
1395 | 1386 |
1396 ~ 1387 ~
1397 1388
1398 Check that fold respects the allowunstable option 1389 Check that fold respects the allowunstable option
1399 1390
1400 (most of this has been moved to test-fold.t) 1391 (most of this has been moved to test-fold.t)
1401 1392
1402 $ hg up 0cf3707e8971 1393 $ hg up edc3c9de504e
1403 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1394 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1404 $ mkcommit unstableifparentisfolded 1395 $ mkcommit unstableifparentisfolded
1405 created new head 1396 created new head
1406 $ glog -r "0cf3707e8971::" 1397 $ glog -r "edc3c9de504e::"
1407 @ 27:2d1b55e10be9@default(draft) add unstableifparentisfolded 1398 @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1408 | 1399 |
1409 | o 26:4c6f6f6d1976@default(draft) add c5_ 1400 | o 29:2251801b6c91@default(draft) add c5_
1410 | | 1401 | |
1411 +---o 18:0c049e4e5422@default(draft) add gh 1402 +---o 20:e02107f98737@default(draft) add gh
1412 | | 1403 | |
1413 | o 17:98e171e2f272@default(draft) add gg 1404 | o 19:24e63b319adf@default(draft) add gg
1414 |/ 1405 |/
1415 o 16:0cf3707e8971@default(draft) a3 1406 o 18:edc3c9de504e@default(draft) a3
1416 | 1407 |
1417 ~ 1408 ~
1418 1409
1419 $ hg fold --exact "98e171e2f272::" 1410 $ hg fold --exact "24e63b319adf::"
1420 2 changesets folded 1411 2 changesets folded
1421 1412
1422 Check that evolve shows error while handling split commits 1413 Check that evolve shows error while handling split commits
1423 -------------------------------------- 1414 --------------------------------------
1424 1415
1425 $ cat >> $HGRCPATH <<EOF 1416 $ cat >> $HGRCPATH <<EOF
1426 > [experimental] 1417 > [experimental]
1427 > evolution=all 1418 > evolution=all
1428 > EOF 1419 > EOF
1429 1420
1430 $ glog -r "0cf3707e8971::" 1421 $ glog -r "edc3c9de504e::"
1431 o 28:92ca6f3984de@default(draft) add gg 1422 o 31:580886d07058@default(draft) add gg
1432 | 1423 |
1433 | @ 27:2d1b55e10be9@default(draft) add unstableifparentisfolded 1424 | @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1434 |/ 1425 |/
1435 | o 18:0c049e4e5422@default(draft) add gh 1426 | o 20:e02107f98737@default(draft) add gh
1436 |/ 1427 |/
1437 o 16:0cf3707e8971@default(draft) a3 1428 o 18:edc3c9de504e@default(draft) a3
1438 | 1429 |
1439 ~ 1430 ~
1440 1431
1441 Create a split commit 1432 Create a split commit
1442 $ printf "oo" > oo; 1433 $ printf "oo" > oo;
1443 $ printf "pp" > pp; 1434 $ printf "pp" > pp;
1444 $ hg add oo pp 1435 $ hg add oo pp
1445 $ hg commit -m "oo+pp" 1436 $ hg commit -m "oo+pp"
1446 $ mkcommit uu 1437 $ mkcommit uu
1447 $ hg up 2d1b55e10be9 1438 $ hg up 68330ac625b8
1448 0 files updated, 0 files merged, 3 files removed, 0 files unresolved 1439 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
1449 $ printf "oo" > oo; 1440 $ printf "oo" > oo;
1450 $ hg add oo 1441 $ hg add oo
1451 $ hg commit -m "_oo" 1442 $ hg commit -m "_oo"
1452 created new head 1443 created new head
1453 $ printf "pp" > pp; 1444 $ printf "pp" > pp;
1454 $ hg add pp 1445 $ hg add pp
1455 $ hg commit -m "_pp" 1446 $ hg commit -m "_pp"
1456 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split 1447 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
1457 1 changesets pruned 1448 1 changesets pruned
1458 1 new orphan changesets 1449 1 new unstable changesets
1459 $ glog -r "0cf3707e8971::" 1450 $ glog -r "edc3c9de504e::"
1460 @ 32:c7dbf668e9d5@default(draft) _pp 1451 @ 35:7a555adf2b4a@default(draft) _pp
1461 | 1452 |
1462 o 31:2b5a32114b3d@default(draft) _oo 1453 o 34:2be4d2d5bf34@default(draft) _oo
1463 | 1454 |
1464 | o 30:4d122571f3b6@default(draft) add uu 1455 | o 33:53f0c003e03e@default(draft) add uu
1465 | | 1456 | |
1466 | x 29:7da3e73df8a5@default(draft) oo+pp 1457 | x 32:1bf2152f4f82@default(draft) oo+pp
1467 |/ 1458 |/
1468 | o 28:92ca6f3984de@default(draft) add gg 1459 | o 31:580886d07058@default(draft) add gg
1469 | | 1460 | |
1470 o | 27:2d1b55e10be9@default(draft) add unstableifparentisfolded 1461 o | 30:68330ac625b8@default(draft) add unstableifparentisfolded
1471 |/ 1462 |/
1472 | o 18:0c049e4e5422@default(draft) add gh 1463 | o 20:e02107f98737@default(draft) add gh
1473 |/ 1464 |/
1474 o 16:0cf3707e8971@default(draft) a3 1465 o 18:edc3c9de504e@default(draft) a3
1475 | 1466 |
1476 ~ 1467 ~
1477 $ hg evolve --rev "0cf3707e8971::" 1468 $ hg evolve --rev "edc3c9de504e::"
1478 move:[30] add uu 1469 move:[33] add uu
1479 atop:[32] _pp 1470 atop:[35] _pp
1480 working directory is now at be23044af550 1471 working directory is now at 43c3f5ef149f
1481 1472
1482 1473
1483 Check that dirstate changes are kept at failure for conflicts (issue4966) 1474 Check that dirstate changes are kept at failure for conflicts (issue4966)
1484 ---------------------------------------- 1475 ----------------------------------------
1485 1476
1486 $ echo "will be amended" > newfile 1477 $ echo "will be amended" > newfile
1487 $ hg commit -m "will be amended" 1478 $ hg commit -m "will be amended"
1488 $ hg parents 1479 $ hg parents
1489 34 : will be amended - test 1480 37 : will be amended - test
1490 1481
1491 $ echo "will be evolved safely" >> a 1482 $ echo "will be evolved safely" >> a
1492 $ hg commit -m "will be evolved safely" 1483 $ hg commit -m "will be evolved safely"
1493 1484
1494 $ echo "will cause conflict at evolve" > newfile 1485 $ echo "will cause conflict at evolve" > newfile
1495 $ echo "newly added" > newlyadded 1486 $ echo "newly added" > newlyadded
1496 $ hg add newlyadded 1487 $ hg add newlyadded
1497 $ hg commit -m "will cause conflict at evolve" 1488 $ hg commit -m "will cause conflict at evolve"
1498 1489
1499 $ glog -r "0cf3707e8971::" 1490 $ hg update -q 36030b147271
1500 @ 36:59c37c5bebd1@default(draft) will cause conflict at evolve
1501 |
1502 o 35:7cc12c6c7862@default(draft) will be evolved safely
1503 |
1504 o 34:98c7ab460e6b@default(draft) will be amended
1505 |
1506 o 33:be23044af550@default(draft) add uu
1507 |
1508 o 32:c7dbf668e9d5@default(draft) _pp
1509 |
1510 o 31:2b5a32114b3d@default(draft) _oo
1511 |
1512 | o 28:92ca6f3984de@default(draft) add gg
1513 | |
1514 o | 27:2d1b55e10be9@default(draft) add unstableifparentisfolded
1515 |/
1516 | o 18:0c049e4e5422@default(draft) add gh
1517 |/
1518 o 16:0cf3707e8971@default(draft) a3
1519 |
1520 ~
1521
1522 $ hg update -q 98c7ab460e6b
1523 $ echo "amended" > newfile 1491 $ echo "amended" > newfile
1524 $ hg amend -m "amended" 1492 $ hg amend -m "amended"
1525 2 new orphan changesets 1493 2 new unstable changesets
1526 1494
1527 $ hg evolve --rev "98c7ab460e6b::" 1495 $ hg evolve --rev "36030b147271::"
1528 move:[35] will be evolved safely 1496 move:[38] will be evolved safely
1529 atop:[37] amended 1497 atop:[41] amended
1530 move:[36] will cause conflict at evolve 1498 move:[39] will cause conflict at evolve
1531 atop:[38] will be evolved safely 1499 atop:[42] will be evolved safely
1532 merging newfile 1500 merging newfile
1533 warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark') 1501 warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
1534 fix conflicts and see `hg help evolve.interrupted` 1502 fix conflicts and see `hg help evolve.interrupted`
1535 [1] 1503 [1]
1536 1504
1537 $ glog -r "be23044af550::" --hidden 1505 $ glog -r "43c3f5ef149f::" --hidden
1538 @ 38:61abd81de026@default(draft) will be evolved safely 1506 @ 42:c904da5245b0@default(draft) will be evolved safely
1539 | 1507 |
1540 o 37:df89d30f23e2@default(draft) amended 1508 o 41:34ae045ec400@default(draft) amended
1541 | 1509 |
1542 | o 36:59c37c5bebd1@default(draft) will cause conflict at evolve 1510 | x 40:e88bee38ffc2@default(draft) temporary amend commit for 36030b147271
1543 | | 1511 | |
1544 | x 35:7cc12c6c7862@default(draft) will be evolved safely 1512 | | o 39:02e943732647@default(draft) will cause conflict at evolve
1545 | | 1513 | | |
1546 | x 34:98c7ab460e6b@default(draft) will be amended 1514 | | x 38:f8e30e9317aa@default(draft) will be evolved safely
1547 |/ 1515 | |/
1548 o 33:be23044af550@default(draft) add uu 1516 | x 37:36030b147271@default(draft) will be amended
1517 |/
1518 o 36:43c3f5ef149f@default(draft) add uu
1549 | 1519 |
1550 ~ 1520 ~
1551 1521
1552 $ hg status newlyadded 1522 $ hg status newlyadded
1553 A newlyadded 1523 A newlyadded
1566 1536
1567 $ echo bar >> a 1537 $ echo bar >> a
1568 $ hg amend 1538 $ hg amend
1569 1539
1570 $ hg log -GT "{rev}:{node|short} {desc} {bookmarks}\n" 1540 $ hg log -GT "{rev}:{node|short} {desc} {bookmarks}\n"
1571 @ 1:ab832e43dd5a added a 1541 @ 2:ab832e43dd5a added a
1572 1542
1573 $ hg up f7ad41964313 --hidden 1543 $ hg up f7ad41964313 --hidden
1574 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1544 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1575 working directory parent is obsolete! (f7ad41964313) 1545 working directory parent is obsolete! (f7ad41964313)
1576 (use 'hg evolve' to update to its successor: ab832e43dd5a) 1546 (use 'hg evolve' to update to its successor: ab832e43dd5a)
1577 1547
1578 $ hg bookmark book 1548 $ hg bookmark book
1579 1549
1580 $ hg evolve 1550 $ hg evolve
1581 update:[1] added a 1551 update:[2] added a
1582 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1552 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1583 working directory is now at ab832e43dd5a 1553 working directory is now at ab832e43dd5a
1584 1554
1585 $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden 1555 $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden
1586 @ 1:ab832e43dd5a added a (book) 1556 @ 2:ab832e43dd5a added a (book)
1587 1557
1558 x 1:9d806b52d1c5 temporary amend commit for f7ad41964313 ()
1559 |
1588 x 0:f7ad41964313 added a () 1560 x 0:f7ad41964313 added a ()
1589 1561