comparison tests/test-evolve.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 13cafb250c1a
children a867d59ea97a
comparison
equal deleted inserted replaced
3104:3dd5a6f83f8b 3105:f5d472b7e800
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
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 orphan 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 (*) {'ef1': '8', 'user': 'test'} (glob) 370 73296a82292a76fb8a7061969d2489ec0d84cd5e 6992c59c6b06a1b4a92e24ff884829ae026d018b 0 (*) {'ef1': '8', 'user': 'test'} (glob)
371 c97947cdc7a2a11cf78419f5c2c3dd3944ec79e8 0 {73296a82292a76fb8a7061969d2489ec0d84cd5e} (*) {'ef1': '0', 'user': 'test'} (glob)
367 568a468b60fc99a42d5d4ddbe181caff1eef308d ba0ec09b1babf3489b567853807f452edd46704f 0 (*) {'ef1': '8', '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 phase-divergent 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 --phasedivergent 415 $ hg evolve --any --traceback --phasedivergent
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 6707c5e1c49d 419 committed as 6707c5e1c49d
414 working directory is now at 6707c5e1c49d 420 working directory is now at 6707c5e1c49d
415 $ glog 421 $ hg log -G
416 @ 7:6707c5e1c49d@default(draft) bumped 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 6707c5e1c49d -r 47d52a103155 430 $ hg diff --hidden -r 6707c5e1c49d -r 47d52a103155
425 $ hg diff -r 6707c5e1c49d^ -r 6707c5e1c49d 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
443 2 new orphan changesets 449 2 new orphan 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 68557e4f0048 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 ..
538 $ hg verify 544 $ hg verify
539 checking changesets 545 checking changesets
540 checking manifests 546 checking manifests
541 crosschecking files in changesets and manifests 547 crosschecking files in changesets and manifests
542 checking files 548 checking files
543 3 files, 3 changesets, 3 total revisions 549 3 files, 4 changesets, 4 total revisions
544 $ hg --config extensions.hgext.mq= strip 'extinct()' 550 $ hg --config extensions.hgext.mq= strip 'extinct()'
545 abort: empty revision set 551 abort: empty revision set
546 [255] 552 [255]
547 (do some garbare collection) 553 (do some garbare collection)
548 $ 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
549 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)
550 $ hg verify 556 $ hg verify
551 checking changesets 557 checking changesets
552 checking manifests 558 checking manifests
553 crosschecking files in changesets and manifests 559 crosschecking files in changesets and manifests
554 checking files 560 checking files
563 searching for changes 569 searching for changes
564 adding changesets 570 adding changesets
565 adding manifests 571 adding manifests
566 adding file changes 572 adding file changes
567 added 1 changesets with 1 changes to 1 files 573 added 1 changesets with 1 changes to 1 files
568 1 new obsolescence markers 574 2 new obsolescence markers
569 (run 'hg update' to get a working copy) 575 (run 'hg update' to get a working copy)
570 $ hg up 576 $ hg up
571 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
572 578
573 $ cd .. 579 $ cd ..
840 $ cd ../work 846 $ cd ../work
841 $ hg fold --from .^ --message "Folding with custom commit message" 847 $ hg fold --from .^ --message "Folding with custom commit message"
842 2 changesets folded 848 2 changesets folded
843 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
844 $ glog 850 $ glog
845 @ 13:98cb758db56d@default(draft) Folding with custom commit message 851 @ 16:98cb758db56d@default(draft) Folding with custom commit message
846 | 852 |
847 o 10:0a2f9b959bb4@default(draft) dansk! 853 o 13:0a2f9b959bb4@default(draft) dansk!
848 | 854 |
849 o 5:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab) 855 o 7:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
850 | 856 |
851 o 4:ba0ec09b1bab@default(public) a nifty feature 857 o 6:ba0ec09b1bab@default(public) a nifty feature
852 | 858 |
853 o 0:e55e0562ee93@default(public) base 859 o 0:e55e0562ee93@default(public) base
854 860
855 $ cat > commit-message <<EOF 861 $ cat > commit-message <<EOF
856 > A longer 862 > A longer
859 865
860 $ hg fold --from .^ --logfile commit-message 866 $ hg fold --from .^ --logfile commit-message
861 2 changesets folded 867 2 changesets folded
862 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
863 $ hg qlog 869 $ hg qlog
864 14 - a00182c58888 A longer 870 17 - a00182c58888 A longer
865 commit message (draft) 871 commit message (draft)
866 5 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public) 872 7 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public)
867 4 - ba0ec09b1bab a nifty feature (public) 873 6 - ba0ec09b1bab a nifty feature (public)
868 0 - e55e0562ee93 base (public) 874 0 - e55e0562ee93 base (public)
869 875
870 $ cd .. 876 $ cd ..
871 877
872 Test branch preservation: 878 Test branch preservation:
904 $ hg amend 910 $ hg amend
905 1 new orphan changesets 911 1 new orphan changesets
906 912
907 $ hg evolve 913 $ hg evolve
908 move:[3] a3 914 move:[3] a3
909 atop:[4] a2 915 atop:[5] a2
910 working directory is now at 7c5649f73d11 916 working directory is now at 7c5649f73d11
911 917
912 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 918 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
913 @ 5 [mybranch] a3 919 @ 6 [mybranch] a3
914 | 920 |
915 o 4 [mybranch] a2 921 o 5 [mybranch] a2
916 | 922 |
917 o 1 [default] a1 923 o 1 [default] a1
918 | 924 |
919 o 0 [default] a0 925 o 0 [default] a0
920 926
924 $ hg up 'desc(a1)' 930 $ hg up 'desc(a1)'
925 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
926 $ hg amend -m 'a1_' 932 $ hg amend -m 'a1_'
927 2 new orphan changesets 933 2 new orphan changesets
928 $ hg evolve 934 $ hg evolve
929 move:[4] a2 935 move:[5] a2
930 atop:[6] a1_ 936 atop:[7] a1_
931 working directory is now at eb07e22a0e63 937 working directory is now at eb07e22a0e63
932 $ hg evolve 938 $ hg evolve
933 move:[5] a3 939 move:[6] a3
934 atop:[7] a2 940 atop:[8] a2
935 working directory is now at 777c26ca5e78 941 working directory is now at 777c26ca5e78
936 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 942 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
937 @ 8 [mybranch] a3 943 @ 9 [mybranch] a3
938 | 944 |
939 o 7 [mybranch] a2 945 o 8 [mybranch] a2
940 | 946 |
941 o 6 [default] a1_ 947 o 7 [default] a1_
942 | 948 |
943 o 0 [default] a0 949 o 0 [default] a0
944 950
945 951
946 Evolve from the middle of a stack pick the right changesets. 952 Evolve from the middle of a stack pick the right changesets.
951 2 new orphan changesets 957 2 new orphan changesets
952 958
953 $ hg up -r "desc('a2')" 959 $ hg up -r "desc('a2')"
954 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
955 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 961 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
956 o 9 [default] a1__ 962 o 10 [default] a1__
957 | 963 |
958 | o 8 [mybranch] a3 964 | o 9 [mybranch] a3
959 | | 965 | |
960 | @ 7 [mybranch] a2 966 | @ 8 [mybranch] a2
961 | | 967 | |
962 | x 6 [default] a1_ 968 | x 7 [default] a1_
963 |/ 969 |/
964 o 0 [default] a0 970 o 0 [default] a0
965 971
966 $ hg evolve 972 $ hg evolve
967 nothing to evolve on current working copy parent 973 nothing to evolve on current working copy parent
976 $ hg bookmark testbookmark 982 $ hg bookmark testbookmark
977 $ ls .hg/bookmarks* 983 $ ls .hg/bookmarks*
978 .hg/bookmarks 984 .hg/bookmarks
979 .hg/bookmarks.* (glob) 985 .hg/bookmarks.* (glob)
980 $ hg evolve 986 $ hg evolve
981 move:[7] a2 987 move:[8] a2
982 atop:[9] a1__ 988 atop:[10] a1__
983 (leaving bookmark testbookmark) 989 (leaving bookmark testbookmark)
984 working directory is now at d952e93add6f 990 working directory is now at d952e93add6f
985 $ ls .hg/bookmarks* 991 $ ls .hg/bookmarks*
986 .hg/bookmarks 992 .hg/bookmarks
987 $ glog 993 $ glog
988 @ 10:d952e93add6f@mybranch(draft) a2 994 @ 11:d952e93add6f@mybranch(draft) a2
989 | 995 |
990 o 9:9f8b83c2e7f3@default(draft) a1__ 996 o 10:9f8b83c2e7f3@default(draft) a1__
991 | 997 |
992 | o 8:777c26ca5e78@mybranch(draft) a3 998 | o 9:777c26ca5e78@mybranch(draft) a3
993 | | 999 | |
994 | x 7:eb07e22a0e63@mybranch(draft) a2 1000 | x 8:eb07e22a0e63@mybranch(draft) a2
995 | | 1001 | |
996 | x 6:faafc6cea0ba@default(draft) a1_ 1002 | x 7:faafc6cea0ba@default(draft) a1_
997 |/ 1003 |/
998 o 0:07c1c36d9ef0@default(draft) a0 1004 o 0:07c1c36d9ef0@default(draft) a0
999 1005
1000 1006
1001 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
1003 $ hg up -r "desc('a1__')" 1009 $ hg up -r "desc('a1__')"
1004 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
1005 $ hg revert -r d952e93add6f --all 1011 $ hg revert -r d952e93add6f --all
1006 reverting a 1012 reverting a
1007 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' 1013 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n'
1008 o 10 [mybranch] a2 1014 o 11 [mybranch] a2
1009 | 1015 |
1010 @ 9 [default] a1__ 1016 @ 10 [default] a1__
1011 | 1017 |
1012 | o 8 [mybranch] a3 1018 | o 9 [mybranch] a3
1013 | | 1019 | |
1014 | x 7 [mybranch] a2 1020 | x 8 [mybranch] a2
1015 | | 1021 | |
1016 | x 6 [default] a1_ 1022 | x 7 [default] a1_
1017 |/ 1023 |/
1018 o 0 [default] a0 1024 o 0 [default] a0
1019 1025
1020 $ echo "hello world" > newfile 1026 $ echo "hello world" > newfile
1021 $ hg add newfile 1027 $ hg add newfile
1022 $ hg commit -m "add new file bumped" -o 10 1028 $ hg commit -m "add new file bumped" -o 11
1023 $ hg phase --public --hidden d952e93add6f 1029 $ hg phase --public --hidden d952e93add6f
1024 1 new phase-divergent changesets 1030 1 new phase-divergent changesets
1025 $ hg log -G 1031 $ hg log -G
1026 @ 11 : add new file bumped - test 1032 @ 12 : add new file bumped - test
1027 | 1033 |
1028 | o 10 : a2 - test 1034 | o 11 : a2 - test
1029 |/ 1035 |/
1030 o 9 testbookmark: a1__ - test 1036 o 10 testbookmark: a1__ - test
1031 | 1037 |
1032 | o 8 : a3 - test 1038 | o 9 : a3 - test
1033 | | 1039 | |
1034 | x 7 : a2 - test 1040 | x 8 : a2 - test
1035 | | 1041 | |
1036 | x 6 : a1_ - test 1042 | x 7 : a1_ - test
1037 |/ 1043 |/
1038 o 0 : a0 - test 1044 o 0 : a0 - test
1039 1045
1040 1046
1041 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
1042 normally the unstable changeset would be solve first 1048 normally the unstable changeset would be solve first
1043 1049
1044 $ hg log -G 1050 $ hg log -G
1045 @ 11 : add new file bumped - test 1051 @ 12 : add new file bumped - test
1046 | 1052 |
1047 | o 10 : a2 - test 1053 | o 11 : a2 - test
1048 |/ 1054 |/
1049 o 9 testbookmark: a1__ - test 1055 o 10 testbookmark: a1__ - test
1050 | 1056 |
1051 | o 8 : a3 - test 1057 | o 9 : a3 - test
1052 | | 1058 | |
1053 | x 7 : a2 - test 1059 | x 8 : a2 - test
1054 | | 1060 | |
1055 | x 6 : a1_ - test 1061 | x 7 : a1_ - test
1056 |/ 1062 |/
1057 o 0 : a0 - test 1063 o 0 : a0 - test
1058 1064
1059 $ hg evolve -r "desc('add new file bumped')" --phasedivergent 1065 $ hg evolve -r "desc('add new file bumped')" --phasedivergent
1060 recreate:[11] add new file bumped 1066 recreate:[12] add new file bumped
1061 atop:[10] a2 1067 atop:[11] a2
1062 computing new diff 1068 computing new diff
1063 committed as f15d32934071 1069 committed as f15d32934071
1064 working directory is now at f15d32934071 1070 working directory is now at f15d32934071
1065 $ hg evolve --any 1071 $ hg evolve --any
1066 move:[8] a3 1072 move:[9] a3
1067 atop:[12] bumped update to d952e93add6f: 1073 atop:[13] bumped update to d952e93add6f:
1068 working directory is now at cce26b684bfe 1074 working directory is now at cce26b684bfe
1069 $ glog
1070 @ 13:cce26b684bfe@default(draft) a3
1071 |
1072 o 12:f15d32934071@default(draft) bumped update to d952e93add6f:
1073 |
1074 o 10:d952e93add6f@mybranch(public) a2
1075 |
1076 o 9:9f8b83c2e7f3@default(public) a1__
1077 |
1078 o 0:07c1c36d9ef0@default(public) a0
1079
1080
1081 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
1082 $ hg up cce26b684bfe -C 1076 $ hg up cce26b684bfe -C
1083 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
1084 $ mkcommit gg 1078 $ mkcommit gg
1085 $ hg up cce26b684bfe 1079 $ hg up cce26b684bfe
1088 created new head 1082 created new head
1089 $ hg up cce26b684bfe 1083 $ hg up cce26b684bfe
1090 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
1091 $ printf "newline\nnewline\n" >> a 1085 $ printf "newline\nnewline\n" >> a
1092 $ hg log -G 1086 $ hg log -G
1093 o 15 : add gh - test 1087 o 16 : add gh - test
1094 | 1088 |
1095 | o 14 : add gg - test 1089 | o 15 : add gg - test
1096 |/ 1090 |/
1097 @ 13 : a3 - test 1091 @ 14 : a3 - test
1098 | 1092 |
1099 o 12 : bumped update to d952e93add6f: - test 1093 o 13 : bumped update to d952e93add6f: - test
1100 | 1094 |
1101 o 10 : a2 - test 1095 o 11 : a2 - test
1102 | 1096 |
1103 o 9 testbookmark: a1__ - test 1097 o 10 testbookmark: a1__ - test
1104 | 1098 |
1105 o 0 : a0 - test 1099 o 0 : a0 - test
1106 1100
1107 $ hg amend 1101 $ hg amend
1108 2 new orphan changesets 1102 2 new orphan changesets
1109 $ glog 1103 $ hg log -G
1110 @ 16:edc3c9de504e@default(draft) a3 1104 @ 18 : a3 - test
1111 | 1105 |
1112 | o 15:beb41503aa3e@default(draft) add gh 1106 | o 16 : add gh - test
1113 | | 1107 | |
1114 | | o 14:27247fcb2df6@default(draft) add gg 1108 | | o 15 : add gg - test
1115 | |/ 1109 | |/
1116 | x 13:cce26b684bfe@default(draft) a3 1110 | x 14 : a3 - test
1117 |/ 1111 |/
1118 o 12:f15d32934071@default(draft) bumped update to d952e93add6f: 1112 o 13 : bumped update to d952e93add6f: - test
1119 | 1113 |
1120 o 10:d952e93add6f@mybranch(public) a2 1114 o 11 : a2 - test
1121 | 1115 |
1122 o 9:9f8b83c2e7f3@default(public) a1__ 1116 o 10 testbookmark: a1__ - test
1123 | 1117 |
1124 o 0:07c1c36d9ef0@default(public) a0 1118 o 0 : a0 - test
1125 1119
1126 1120
1127 Evolving an empty revset should do nothing 1121 Evolving an empty revset should do nothing
1128 $ hg evolve --rev "beb41503aa3e and 27247fcb2df6" 1122 $ hg evolve --rev "beb41503aa3e and 27247fcb2df6"
1129 set of specified revisions is empty 1123 set of specified revisions is empty
1132 $ hg evolve --rev "cce26b684bfe::" --phasedivergent 1126 $ hg evolve --rev "cce26b684bfe::" --phasedivergent
1133 no phasedivergent changesets in specified revisions 1127 no phasedivergent changesets in specified revisions
1134 (do you want to use --orphan) 1128 (do you want to use --orphan)
1135 [2] 1129 [2]
1136 $ hg evolve --rev "cce26b684bfe::" --orphan 1130 $ hg evolve --rev "cce26b684bfe::" --orphan
1137 move:[14] add gg 1131 move:[15] add gg
1138 atop:[16] a3 1132 atop:[18] a3
1139 move:[15] add gh 1133 move:[16] add gh
1140 atop:[16] a3 1134 atop:[18] a3
1141 working directory is now at e02107f98737 1135 working directory is now at e02107f98737
1142 $ glog 1136 $ hg log -G
1143 @ 18:e02107f98737@default(draft) add gh 1137 @ 20 : add gh - test
1144 | 1138 |
1145 | o 17:24e63b319adf@default(draft) add gg 1139 | o 19 : add gg - test
1146 |/ 1140 |/
1147 o 16:edc3c9de504e@default(draft) a3 1141 o 18 : a3 - test
1148 | 1142 |
1149 o 12:f15d32934071@default(draft) bumped update to d952e93add6f: 1143 o 13 : bumped update to d952e93add6f: - test
1150 | 1144 |
1151 o 10:d952e93add6f@mybranch(public) a2 1145 o 11 : a2 - test
1152 | 1146 |
1153 o 9:9f8b83c2e7f3@default(public) a1__ 1147 o 10 testbookmark: a1__ - test
1154 | 1148 |
1155 o 0:07c1c36d9ef0@default(public) a0 1149 o 0 : a0 - test
1156 1150
1157 Enabling commands selectively, no command enabled, next and fold and unknown 1151 Enabling commands selectively, no command enabled, next and fold and unknown
1158 $ cat >> $HGRCPATH <<EOF 1152 $ cat >> $HGRCPATH <<EOF
1159 > [experimental] 1153 > [experimental]
1160 > evolution=createmarkers 1154 > evolution=createmarkers
1266 $ echo "hello" > j4 1260 $ echo "hello" > j4
1267 $ hg add j4 1261 $ hg add j4
1268 $ hg amend 1262 $ hg amend
1269 2 new orphan changesets 1263 2 new orphan changesets
1270 $ glog -r "edc3c9de504e::" 1264 $ glog -r "edc3c9de504e::"
1271 @ 22:8dc373be86d9@default(draft) add j1 1265 @ 25:8dc373be86d9@default(draft) add j1
1272 | 1266 |
1273 | o 21:d7eadcf6eccd@default(draft) add j3 1267 | o 23:d7eadcf6eccd@default(draft) add j3
1274 | | 1268 | |
1275 | o 20:2223ea564144@default(draft) add j2 1269 | o 22:2223ea564144@default(draft) add j2
1276 | | 1270 | |
1277 | x 19:48490698b269@default(draft) add j1 1271 | x 21:48490698b269@default(draft) add j1
1278 |/ 1272 |/
1279 | o 18:e02107f98737@default(draft) add gh 1273 | o 20:e02107f98737@default(draft) add gh
1280 | | 1274 | |
1281 o | 17:24e63b319adf@default(draft) add gg 1275 o | 19:24e63b319adf@default(draft) add gg
1282 |/ 1276 |/
1283 o 16:edc3c9de504e@default(draft) a3 1277 o 18:edc3c9de504e@default(draft) a3
1284 | 1278 |
1285 ~ 1279 ~
1286 1280
1287 $ hg evolve --rev d7eadcf6eccd --any 1281 $ hg evolve --rev d7eadcf6eccd --any
1288 abort: cannot specify both "--rev" and "--any" 1282 abort: cannot specify both "--rev" and "--any"
1306 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 1300 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1307 $ hg uncommit --all 1301 $ hg uncommit --all
1308 new changeset is empty 1302 new changeset is empty
1309 (use 'hg prune .' to remove it) 1303 (use 'hg prune .' to remove it)
1310 $ glog -r "edc3c9de504e::" 1304 $ glog -r "edc3c9de504e::"
1311 @ 23:044804d0c10d@default(draft) add j1 1305 @ 26:044804d0c10d@default(draft) add j1
1312 | 1306 |
1313 | o 21:d7eadcf6eccd@default(draft) add j3 1307 | o 23:d7eadcf6eccd@default(draft) add j3
1314 | | 1308 | |
1315 | o 20:2223ea564144@default(draft) add j2 1309 | o 22:2223ea564144@default(draft) add j2
1316 | | 1310 | |
1317 | x 19:48490698b269@default(draft) add j1 1311 | x 21:48490698b269@default(draft) add j1
1318 |/ 1312 |/
1319 | o 18:e02107f98737@default(draft) add gh 1313 | o 20:e02107f98737@default(draft) add gh
1320 | | 1314 | |
1321 o | 17:24e63b319adf@default(draft) add gg 1315 o | 19:24e63b319adf@default(draft) add gg
1322 |/ 1316 |/
1323 o 16:edc3c9de504e@default(draft) a3 1317 o 18:edc3c9de504e@default(draft) a3
1324 | 1318 |
1325 ~ 1319 ~
1326 1320
1327 Check that prune respects the allowunstable option 1321 Check that prune respects the allowunstable option
1328 $ hg up -C . 1322 $ hg up -C .
1332 $ hg evolve --all 1326 $ hg evolve --all
1333 nothing to evolve on current working copy parent 1327 nothing to evolve on current working copy parent
1334 (2 other orphan in the repository, do you want --any or --rev) 1328 (2 other orphan in the repository, do you want --any or --rev)
1335 [2] 1329 [2]
1336 $ hg evolve --all --any 1330 $ hg evolve --all --any
1337 move:[20] add j2 1331 move:[22] add j2
1338 atop:[23] add j1 1332 atop:[26] add j1
1339 move:[21] add j3 1333 move:[23] add j3
1340 atop:[24] add j2 1334 atop:[27] add j2
1341 working directory is now at c9a20e2d74aa 1335 working directory is now at c9a20e2d74aa
1342 $ glog -r "edc3c9de504e::" 1336 $ glog -r "edc3c9de504e::"
1343 @ 25:c9a20e2d74aa@default(draft) add j3 1337 @ 28:c9a20e2d74aa@default(draft) add j3
1344 | 1338 |
1345 o 24:b0e3066231e2@default(draft) add j2 1339 o 27:b0e3066231e2@default(draft) add j2
1346 | 1340 |
1347 o 23:044804d0c10d@default(draft) add j1 1341 o 26:044804d0c10d@default(draft) add j1
1348 | 1342 |
1349 | o 18:e02107f98737@default(draft) add gh 1343 | o 20:e02107f98737@default(draft) add gh
1350 | | 1344 | |
1351 o | 17:24e63b319adf@default(draft) add gg 1345 o | 19:24e63b319adf@default(draft) add gg
1352 |/ 1346 |/
1353 o 16:edc3c9de504e@default(draft) a3 1347 o 18:edc3c9de504e@default(draft) a3
1354 | 1348 |
1355 ~ 1349 ~
1356 $ hg up 24e63b319adf 1350 $ hg up 19
1357 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1351 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1358 $ mkcommit c5_ 1352 $ mkcommit c5_
1359 created new head 1353 created new head
1360 $ hg prune '044804d0c10d + b0e3066231e2' 1354 $ hg prune '044804d0c10d + b0e3066231e2'
1361 abort: touch will orphan 1 descendants 1355 abort: touch will orphan 1 descendants
1366 (see 'hg help evolution.instability') 1360 (see 'hg help evolution.instability')
1367 [255] 1361 [255]
1368 $ hg prune '044804d0c10d::' 1362 $ hg prune '044804d0c10d::'
1369 3 changesets pruned 1363 3 changesets pruned
1370 $ glog -r "edc3c9de504e::" 1364 $ glog -r "edc3c9de504e::"
1371 @ 26:2251801b6c91@default(draft) add c5_ 1365 @ 29:2251801b6c91@default(draft) add c5_
1372 | 1366 |
1373 | o 18:e02107f98737@default(draft) add gh 1367 | o 20:e02107f98737@default(draft) add gh
1374 | | 1368 | |
1375 o | 17:24e63b319adf@default(draft) add gg 1369 o | 19:24e63b319adf@default(draft) add gg
1376 |/ 1370 |/
1377 o 16:edc3c9de504e@default(draft) a3 1371 o 18:edc3c9de504e@default(draft) a3
1378 | 1372 |
1379 ~ 1373 ~
1380 1374
1381 Check that fold respects the allowunstable option 1375 Check that fold respects the allowunstable option
1382 1376
1385 $ hg up edc3c9de504e 1379 $ hg up edc3c9de504e
1386 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 1380 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1387 $ mkcommit unstableifparentisfolded 1381 $ mkcommit unstableifparentisfolded
1388 created new head 1382 created new head
1389 $ glog -r "edc3c9de504e::" 1383 $ glog -r "edc3c9de504e::"
1390 @ 27:68330ac625b8@default(draft) add unstableifparentisfolded 1384 @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1391 | 1385 |
1392 | o 26:2251801b6c91@default(draft) add c5_ 1386 | o 29:2251801b6c91@default(draft) add c5_
1393 | | 1387 | |
1394 +---o 18:e02107f98737@default(draft) add gh 1388 +---o 20:e02107f98737@default(draft) add gh
1395 | | 1389 | |
1396 | o 17:24e63b319adf@default(draft) add gg 1390 | o 19:24e63b319adf@default(draft) add gg
1397 |/ 1391 |/
1398 o 16:edc3c9de504e@default(draft) a3 1392 o 18:edc3c9de504e@default(draft) a3
1399 | 1393 |
1400 ~ 1394 ~
1401 1395
1402 $ hg fold --exact "24e63b319adf::" 1396 $ hg fold --exact "24e63b319adf::"
1403 2 changesets folded 1397 2 changesets folded
1409 > [experimental] 1403 > [experimental]
1410 > evolution=all 1404 > evolution=all
1411 > EOF 1405 > EOF
1412 1406
1413 $ glog -r "edc3c9de504e::" 1407 $ glog -r "edc3c9de504e::"
1414 o 28:580886d07058@default(draft) add gg 1408 o 31:580886d07058@default(draft) add gg
1415 | 1409 |
1416 | @ 27:68330ac625b8@default(draft) add unstableifparentisfolded 1410 | @ 30:68330ac625b8@default(draft) add unstableifparentisfolded
1417 |/ 1411 |/
1418 | o 18:e02107f98737@default(draft) add gh 1412 | o 20:e02107f98737@default(draft) add gh
1419 |/ 1413 |/
1420 o 16:edc3c9de504e@default(draft) a3 1414 o 18:edc3c9de504e@default(draft) a3
1421 | 1415 |
1422 ~ 1416 ~
1423 1417
1424 Create a split commit 1418 Create a split commit
1425 $ printf "oo" > oo; 1419 $ printf "oo" > oo;
1438 $ hg commit -m "_pp" 1432 $ hg commit -m "_pp"
1439 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split 1433 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
1440 1 changesets pruned 1434 1 changesets pruned
1441 1 new orphan changesets 1435 1 new orphan changesets
1442 $ glog -r "edc3c9de504e::" 1436 $ glog -r "edc3c9de504e::"
1443 @ 32:7a555adf2b4a@default(draft) _pp 1437 @ 35:7a555adf2b4a@default(draft) _pp
1444 | 1438 |
1445 o 31:2be4d2d5bf34@default(draft) _oo 1439 o 34:2be4d2d5bf34@default(draft) _oo
1446 | 1440 |
1447 | o 30:53f0c003e03e@default(draft) add uu 1441 | o 33:53f0c003e03e@default(draft) add uu
1448 | | 1442 | |
1449 | x 29:1bf2152f4f82@default(draft) oo+pp 1443 | x 32:1bf2152f4f82@default(draft) oo+pp
1450 |/ 1444 |/
1451 | o 28:580886d07058@default(draft) add gg 1445 | o 31:580886d07058@default(draft) add gg
1452 | | 1446 | |
1453 o | 27:68330ac625b8@default(draft) add unstableifparentisfolded 1447 o | 30:68330ac625b8@default(draft) add unstableifparentisfolded
1454 |/ 1448 |/
1455 | o 18:e02107f98737@default(draft) add gh 1449 | o 20:e02107f98737@default(draft) add gh
1456 |/ 1450 |/
1457 o 16:edc3c9de504e@default(draft) a3 1451 o 18:edc3c9de504e@default(draft) a3
1458 | 1452 |
1459 ~ 1453 ~
1460 $ hg evolve --rev "edc3c9de504e::" 1454 $ hg evolve --rev "edc3c9de504e::"
1461 move:[30] add uu 1455 move:[33] add uu
1462 atop:[32] _pp 1456 atop:[35] _pp
1463 working directory is now at 43c3f5ef149f 1457 working directory is now at 43c3f5ef149f
1464 1458
1465 1459
1466 Check that dirstate changes are kept at failure for conflicts (issue4966) 1460 Check that dirstate changes are kept at failure for conflicts (issue4966)
1467 ---------------------------------------- 1461 ----------------------------------------
1468 1462
1469 $ echo "will be amended" > newfile 1463 $ echo "will be amended" > newfile
1470 $ hg commit -m "will be amended" 1464 $ hg commit -m "will be amended"
1471 $ hg parents 1465 $ hg parents
1472 34 : will be amended - test 1466 37 : will be amended - test
1473 1467
1474 $ echo "will be evolved safely" >> a 1468 $ echo "will be evolved safely" >> a
1475 $ hg commit -m "will be evolved safely" 1469 $ hg commit -m "will be evolved safely"
1476 1470
1477 $ echo "will cause conflict at evolve" > newfile 1471 $ echo "will cause conflict at evolve" > newfile
1478 $ echo "newly added" > newlyadded 1472 $ echo "newly added" > newlyadded
1479 $ hg add newlyadded 1473 $ hg add newlyadded
1480 $ hg commit -m "will cause conflict at evolve" 1474 $ hg commit -m "will cause conflict at evolve"
1481 1475
1482 $ glog -r "edc3c9de504e::"
1483 @ 36:02e943732647@default(draft) will cause conflict at evolve
1484 |
1485 o 35:f8e30e9317aa@default(draft) will be evolved safely
1486 |
1487 o 34:36030b147271@default(draft) will be amended
1488 |
1489 o 33:43c3f5ef149f@default(draft) add uu
1490 |
1491 o 32:7a555adf2b4a@default(draft) _pp
1492 |
1493 o 31:2be4d2d5bf34@default(draft) _oo
1494 |
1495 | o 28:580886d07058@default(draft) add gg
1496 | |
1497 o | 27:68330ac625b8@default(draft) add unstableifparentisfolded
1498 |/
1499 | o 18:e02107f98737@default(draft) add gh
1500 |/
1501 o 16:edc3c9de504e@default(draft) a3
1502 |
1503 ~
1504
1505 $ hg update -q 36030b147271 1476 $ hg update -q 36030b147271
1506 $ echo "amended" > newfile 1477 $ echo "amended" > newfile
1507 $ hg amend -m "amended" 1478 $ hg amend -m "amended"
1508 2 new orphan changesets 1479 2 new orphan changesets
1509 1480
1510 $ hg evolve --rev "36030b147271::" 1481 $ hg evolve --rev "36030b147271::"
1511 move:[35] will be evolved safely 1482 move:[38] will be evolved safely
1512 atop:[37] amended 1483 atop:[41] amended
1513 move:[36] will cause conflict at evolve 1484 move:[39] will cause conflict at evolve
1514 atop:[38] will be evolved safely 1485 atop:[42] will be evolved safely
1515 merging newfile 1486 merging newfile
1516 warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark') 1487 warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
1517 evolve failed! 1488 evolve failed!
1518 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort 1489 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort
1519 abort: unresolved merge conflicts (see hg help resolve) 1490 abort: unresolved merge conflicts (see hg help resolve)
1520 [255] 1491 [255]
1521 1492
1522 $ glog -r "43c3f5ef149f::" --hidden 1493 $ glog -r "43c3f5ef149f::" --hidden
1523 @ 38:c904da5245b0@default(draft) will be evolved safely 1494 @ 42:c904da5245b0@default(draft) will be evolved safely
1524 | 1495 |
1525 o 37:34ae045ec400@default(draft) amended 1496 o 41:34ae045ec400@default(draft) amended
1526 | 1497 |
1527 | o 36:02e943732647@default(draft) will cause conflict at evolve 1498 | x 40:e88bee38ffc2@default(draft) temporary amend commit for 36030b147271
1528 | | 1499 | |
1529 | x 35:f8e30e9317aa@default(draft) will be evolved safely 1500 | | o 39:02e943732647@default(draft) will cause conflict at evolve
1530 | | 1501 | | |
1531 | x 34:36030b147271@default(draft) will be amended 1502 | | x 38:f8e30e9317aa@default(draft) will be evolved safely
1532 |/ 1503 | |/
1533 o 33:43c3f5ef149f@default(draft) add uu 1504 | x 37:36030b147271@default(draft) will be amended
1505 |/
1506 o 36:43c3f5ef149f@default(draft) add uu
1534 | 1507 |
1535 ~ 1508 ~
1536 1509
1537 $ hg status newlyadded 1510 $ hg status newlyadded
1538 A newlyadded 1511 A newlyadded