Mercurial > evolve
comparison tests/test-tutorial.t @ 6903:de8156fbbdcc mercurial-6.3
test-compat: merge mercurial-6.4 into mercurial-6.3
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 24 Oct 2024 17:57:18 +0400 |
parents | 45cbf0af48e7 |
children | 237f99ee3d64 |
comparison
equal
deleted
inserted
replaced
6802:681b100496ff | 6903:de8156fbbdcc |
---|---|
1 =============== | |
2 Evolve Tutorial | |
3 =============== | |
1 | 4 |
2 Initial setup | 5 Initial setup |
3 ------------- | 6 ------------- |
4 | 7 |
5 This Mercurial configuration example is used for testing. | 8 This Mercurial configuration example is used for testing. |
97 adding changesets | 100 adding changesets |
98 adding manifests | 101 adding manifests |
99 adding file changes | 102 adding file changes |
100 added 1 changesets with 1 changes to 1 files | 103 added 1 changesets with 1 changes to 1 files |
101 | 104 |
102 Later I add additional item to my list | 105 Later I add additional items to my list |
103 | 106 |
104 $ cat >> shopping << EOF | 107 $ cat >> shopping << EOF |
105 > Egg | 108 > Egg |
106 > Suggar | 109 > Sugar |
107 > Vinegar | 110 > Vinegar |
108 > Oil | 111 > Oil |
109 > EOF | 112 > EOF |
110 $ hg commit -m "adding condiment" | 113 $ hg commit -m "adding condiment" |
111 $ cat >> shopping << EOF | 114 $ cat >> shopping << EOF |
113 > Pear | 116 > Pear |
114 > Apple | 117 > Apple |
115 > EOF | 118 > EOF |
116 $ hg commit -m "adding fruit" | 119 $ hg commit -m "adding fruit" |
117 | 120 |
118 This history is very linear | 121 The history is completely linear so far |
119 | 122 |
120 $ hg log -G | 123 $ hg log -G |
121 @ d85de4546133 (draft): adding fruit | 124 @ 4296f0622469 (draft): adding fruit |
122 | | 125 | |
123 o 4d5dc8187023 (draft): adding condiment | 126 o 63ae8c44f4b6 (draft): adding condiment |
124 | | 127 | |
125 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 128 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
126 | 129 |
127 #if docgraph-ext | 130 #if docgraph-ext |
128 $ hg docgraph -r "all()" --sphinx-directive --rankdir LR #rest-ignore | 131 $ hg docgraph -r "all()" --sphinx-directive --rankdir LR #rest-ignore |
168 1 -> 2 [arrowhead=none, | 171 1 -> 2 [arrowhead=none, |
169 penwidth=2.0]; | 172 penwidth=2.0]; |
170 } | 173 } |
171 #endif | 174 #endif |
172 | 175 |
173 But a typo was made in Babanas! | 176 But a typo was made in Bananas! |
174 | 177 |
175 $ hg export tip | 178 $ hg export tip |
176 # HG changeset patch | 179 # HG changeset patch |
177 # User test | 180 # User test |
178 # Date 0 0 | 181 # Date 0 0 |
179 # Thu Jan 01 00:00:00 1970 +0000 | 182 # Thu Jan 01 00:00:00 1970 +0000 |
180 # Node ID d85de4546133030c82d257bbcdd9b1b416d0c31c | 183 # Node ID 4296f0622469c1527d5dc020cf72bd7732c44c64 |
181 # Parent 4d5dc81870237d492284826e21840b2ca00e26d1 | 184 # Parent 63ae8c44f4b6274d5580b4eea41a87623301c3e9 |
182 adding fruit | 185 adding fruit |
183 | 186 |
184 diff --git a/shopping b/shopping | 187 diff --git a/shopping b/shopping |
185 --- a/shopping | 188 --- a/shopping |
186 +++ b/shopping | 189 +++ b/shopping |
187 @@ -9,3 +9,6 @@ | 190 @@ -9,3 +9,6 @@ |
188 Suggar | 191 Sugar |
189 Vinegar | 192 Vinegar |
190 Oil | 193 Oil |
191 +Bananos | 194 +Bananos |
192 +Pear | 195 +Pear |
193 +Apple | 196 +Apple |
194 | 197 |
195 The faulty changeset is in the "draft" phase because it has not been exchanged with | 198 The faulty changeset is in the "draft" phase because it has not been exchanged with |
196 the outside. The first one has been exchanged and is "public" (immutable). | 199 the outside yet. The first one has been exchanged and is "public" (immutable). |
197 | 200 |
198 $ hg log -G | 201 $ hg log -G |
199 @ d85de4546133 (draft): adding fruit | 202 @ 4296f0622469 (draft): adding fruit |
200 | | 203 | |
201 o 4d5dc8187023 (draft): adding condiment | 204 o 63ae8c44f4b6 (draft): adding condiment |
202 | | 205 | |
203 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 206 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
204 | 207 |
205 | 208 |
206 #if docgraph-ext | 209 #if docgraph-ext |
247 1 -> 2 [arrowhead=none, | 250 1 -> 2 [arrowhead=none, |
248 penwidth=2.0]; | 251 penwidth=2.0]; |
249 } | 252 } |
250 #endif | 253 #endif |
251 | 254 |
252 Hopefully. I can use `hg commit --amend` to rewrite my faulty changeset! | 255 Luckily, I can use `hg commit --amend` to rewrite my faulty changeset! |
253 | 256 |
254 $ sed -i'' -e s/Bananos/Banana/ shopping | 257 $ sed -i'' -e s/Bananos/Banana/ shopping |
255 $ hg diff | 258 $ hg diff |
256 diff --git a/shopping b/shopping | 259 diff --git a/shopping b/shopping |
257 --- a/shopping | 260 --- a/shopping |
258 +++ b/shopping | 261 +++ b/shopping |
259 @@ -9,6 +9,6 @@ | 262 @@ -9,6 +9,6 @@ |
260 Suggar | 263 Sugar |
261 Vinegar | 264 Vinegar |
262 Oil | 265 Oil |
263 -Bananos | 266 -Bananos |
264 +Banana | 267 +Banana |
265 Pear | 268 Pear |
266 Apple | 269 Apple |
267 $ hg commit --amend | 270 $ hg commit --amend |
268 | 271 |
269 A new changeset with the right diff replace the wrong one. | 272 A new changeset with the correct changes replaces the old one. |
270 | 273 |
271 $ hg log -G | 274 $ hg log -G |
272 @ 9d0363b81950 (draft): adding fruit | 275 @ 6445b365ad1c (draft): adding fruit |
273 | | 276 | |
274 o 4d5dc8187023 (draft): adding condiment | 277 o 63ae8c44f4b6 (draft): adding condiment |
275 | | 278 | |
276 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 279 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
277 | 280 |
278 #if docgraph-ext | 281 #if docgraph-ext |
279 $ hg docgraph -r "all()" --sphinx-directive --rankdir LR #rest-ignore | 282 $ hg docgraph -r "all()" --sphinx-directive --rankdir LR #rest-ignore |
324 $ hg export tip | 327 $ hg export tip |
325 # HG changeset patch | 328 # HG changeset patch |
326 # User test | 329 # User test |
327 # Date 0 0 | 330 # Date 0 0 |
328 # Thu Jan 01 00:00:00 1970 +0000 | 331 # Thu Jan 01 00:00:00 1970 +0000 |
329 # Node ID 9d0363b81950646bc6ad1ec5de8b8197ea586541 | 332 # Node ID 6445b365ad1c4905e7a120e45242d9f4b51ec48f |
330 # Parent 4d5dc81870237d492284826e21840b2ca00e26d1 | 333 # Parent 63ae8c44f4b6274d5580b4eea41a87623301c3e9 |
331 adding fruit | 334 adding fruit |
332 | 335 |
333 diff --git a/shopping b/shopping | 336 diff --git a/shopping b/shopping |
334 --- a/shopping | 337 --- a/shopping |
335 +++ b/shopping | 338 +++ b/shopping |
336 @@ -9,3 +9,6 @@ | 339 @@ -9,3 +9,6 @@ |
337 Suggar | 340 Sugar |
338 Vinegar | 341 Vinegar |
339 Oil | 342 Oil |
340 +Banana | 343 +Banana |
341 +Pear | 344 +Pear |
342 +Apple | 345 +Apple |
343 | 346 |
344 Getting rid of branchy history | 347 Getting rid of branchy history |
345 ---------------------------------- | 348 ---------------------------------- |
346 | 349 |
347 While I was working on my list. Someone made a change remotely. | 350 While I was working on my list, someone made a change remotely. |
348 | 351 |
349 $ cd ../remote | 352 $ cd ../remote |
350 $ hg up -q | 353 $ hg up -q |
351 $ sed -i'' -e 's/Spam/Spam Spam Spam/' shopping | 354 $ sed -i'' -e 's/Spam/Spam Spam Spam/' shopping |
352 $ hg ci -m 'SPAM' | 355 $ hg ci -m 'SPAM' |
367 I now have a new head. Note that this remote head is immutable. | 370 I now have a new head. Note that this remote head is immutable. |
368 | 371 |
369 $ hg log -G | 372 $ hg log -G |
370 o 9ca060c80d74 (public): SPAM | 373 o 9ca060c80d74 (public): SPAM |
371 | | 374 | |
372 | @ 9d0363b81950 (draft): adding fruit | 375 | @ 6445b365ad1c (draft): adding fruit |
373 | | | 376 | | |
374 | o 4d5dc8187023 (draft): adding condiment | 377 | o 63ae8c44f4b6 (draft): adding condiment |
375 |/ | 378 |/ |
376 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 379 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
377 | 380 |
378 | 381 |
379 #if docgraph-ext | 382 #if docgraph-ext |
435 #endif | 438 #endif |
436 | 439 |
437 Instead of merging my head with the new one. I'm going to rebase my work | 440 Instead of merging my head with the new one. I'm going to rebase my work |
438 | 441 |
439 $ hg diff | 442 $ hg diff |
440 $ hg rebase --dest 9ca060c80d74 --source 4d5dc8187023 | 443 $ hg rebase --dest 9ca060c80d74 --source 63ae8c44f4b6 |
441 rebasing 1:4d5dc8187023 "adding condiment" | 444 rebasing 1:63ae8c44f4b6 "adding condiment" |
442 merging shopping | 445 merging shopping |
443 rebasing 3:9d0363b81950 "adding fruit" | 446 rebasing 3:6445b365ad1c "adding fruit" |
444 merging shopping | 447 merging shopping |
445 | 448 |
446 | 449 |
447 My local work is now rebased on the remote one. | 450 My local work is now rebased on the remote one. |
448 | 451 |
449 $ hg log -G | 452 $ hg log -G |
450 @ 41aff6a42b75 (draft): adding fruit | 453 @ d300c8f961ce (draft): adding fruit |
451 | | 454 | |
452 o dfd3a2d7691e (draft): adding condiment | 455 o 723e5a43d6d9 (draft): adding condiment |
453 | | 456 | |
454 o 9ca060c80d74 (public): SPAM | 457 o 9ca060c80d74 (public): SPAM |
455 | | 458 | |
456 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 459 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
457 | 460 |
524 > plane | 527 > plane |
525 > boat | 528 > boat |
526 > EOF | 529 > EOF |
527 $ hg ci -m 'transport' | 530 $ hg ci -m 'transport' |
528 $ hg log -G | 531 $ hg log -G |
529 @ 1125e39fbf21 (draft): transport | 532 @ 7f938a07ecb2 (draft): transport |
530 | | 533 | |
531 o 41aff6a42b75 (draft): adding fruit | 534 o d300c8f961ce (draft): adding fruit |
532 | | 535 | |
533 o dfd3a2d7691e (draft): adding condiment | 536 o 723e5a43d6d9 (draft): adding condiment |
534 | | 537 | |
535 o 9ca060c80d74 (public): SPAM | 538 o 9ca060c80d74 (public): SPAM |
536 | | 539 | |
537 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 540 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
538 | 541 |
539 | 542 |
540 I have a new commit but I realize that don't want it. (Transport shop list does | 543 I have a new commit but I realize that don't want it. (Transport shopping list |
541 not fit well in my standard shopping list) | 544 does not fit well in my standard shopping list) |
542 | 545 |
543 $ hg prune . # "." is for working directory parent | 546 $ hg prune . # "." is for working directory parent |
544 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 547 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
545 working directory is now at 41aff6a42b75 | 548 working directory is now at d300c8f961ce |
546 1 changesets pruned | 549 1 changesets pruned |
547 | 550 |
548 The silly changeset is gone. | 551 The silly changeset is gone. |
549 | 552 |
550 $ hg log -G | 553 $ hg log -G |
551 @ 41aff6a42b75 (draft): adding fruit | 554 @ d300c8f961ce (draft): adding fruit |
552 | | 555 | |
553 o dfd3a2d7691e (draft): adding condiment | 556 o 723e5a43d6d9 (draft): adding condiment |
554 | | 557 | |
555 o 9ca060c80d74 (public): SPAM | 558 o 9ca060c80d74 (public): SPAM |
556 | | 559 | |
557 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 560 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
558 | 561 |
627 > Toothbrush | 630 > Toothbrush |
628 > ... More bathroom stuff to come | 631 > ... More bathroom stuff to come |
629 > Towel | 632 > Towel |
630 > Soap | 633 > Soap |
631 > EOF | 634 > EOF |
632 $ hg ci -m 'bathroom stuff' -q # XXX remove the -q | 635 $ hg ci -m 'bathroom stuff' |
633 | 636 |
634 $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping | 637 $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping |
635 $ hg ci -m 'SPAM SPAM' | 638 $ hg ci -m 'SPAM SPAM' |
636 $ hg log -G | 639 $ hg log -G |
637 @ fac207dec9f5 (draft): SPAM SPAM | 640 @ 1c877d31b53f (draft): SPAM SPAM |
638 | | 641 | |
639 o 10b8aeaa8cc8 (draft): bathroom stuff | 642 o d1928babc208 (draft): bathroom stuff |
640 | | 643 | |
641 o 41aff6a42b75 (draft): adding fruit | 644 o d300c8f961ce (draft): adding fruit |
642 | | 645 | |
643 o dfd3a2d7691e (draft): adding condiment | 646 o 723e5a43d6d9 (draft): adding condiment |
644 | | 647 | |
645 o 9ca060c80d74 (public): SPAM | 648 o 9ca060c80d74 (public): SPAM |
646 | | 649 | |
647 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 650 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
648 | 651 |
649 | 652 |
650 .. note:: We can't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable. | 653 .. note:: We can't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable. |
651 | 654 |
652 I now want to push to remote all my changes except the bathroom one, which I'm | 655 I now want to push to remote all my changes except the bathroom one, which I'm |
653 not totally happy with yet. To be able to push "SPAM SPAM" I need a version of | 656 not totally happy with yet. To be able to push "SPAM SPAM" I need a version of |
654 "SPAM SPAM" which is not a child of "bathroom stuff" | 657 "SPAM SPAM" which is not a child of "bathroom stuff". |
655 | 658 |
656 You can use the 'grab' alias for that. | 659 You can use the 'grab' command for that. |
657 | 660 |
658 .. note: grab is an alias for `hg rebase --dest . --rev <target>; hg up <there>` | 661 .. note:: `grab` is an alias for `hg rebase --dest . --rev <target>; hg up <result>` |
659 | 662 |
660 $ hg up 'p1(10b8aeaa8cc8)' # going on "bathroom stuff" parent | 663 $ hg up 'p1(d1928babc208)' # going on "bathroom stuff" parent |
661 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 664 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
662 $ hg pick fac207dec9f5 # moving "SPAM SPAM" to the working directory parent | 665 $ hg pick 1c877d31b53f # moving "SPAM SPAM" to the working directory parent |
663 picking 9:fac207dec9f5 "SPAM SPAM" | 666 picking 9:1c877d31b53f "SPAM SPAM" |
664 merging shopping | 667 merging shopping |
665 $ hg log -G | 668 $ hg log -G |
666 @ 57e9caedbcb8 (draft): SPAM SPAM | 669 @ 501b33037995 (draft): SPAM SPAM |
667 | | 670 | |
668 | o 10b8aeaa8cc8 (draft): bathroom stuff | 671 | o d1928babc208 (draft): bathroom stuff |
669 |/ | 672 |/ |
670 o 41aff6a42b75 (draft): adding fruit | 673 o d300c8f961ce (draft): adding fruit |
671 | | 674 | |
672 o dfd3a2d7691e (draft): adding condiment | 675 o 723e5a43d6d9 (draft): adding condiment |
673 | | 676 | |
674 o 9ca060c80d74 (public): SPAM | 677 o 9ca060c80d74 (public): SPAM |
675 | | 678 | |
676 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 679 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
677 | 680 |
756 6 -> 10 [arrowhead=none, | 759 6 -> 10 [arrowhead=none, |
757 penwidth=2.0]; | 760 penwidth=2.0]; |
758 } | 761 } |
759 #endif | 762 #endif |
760 | 763 |
761 We have a new SPAM SPAM version without the bathroom stuff | 764 We have a new version of "SPAM SPAM" without the bathroom stuff |
762 | 765 |
763 $ grep Spam shopping # enough spam | 766 $ grep Spam shopping # enough spam |
764 Spam Spam Spam Spam Spam Spam Spam Spam Spam | 767 Spam Spam Spam Spam Spam Spam Spam Spam Spam |
765 $ grep Toothbrush shopping # no Toothbrush | 768 $ grep Toothbrush shopping # no Toothbrush |
766 [1] | 769 [1] |
767 $ hg export . | 770 $ hg export . |
768 # HG changeset patch | 771 # HG changeset patch |
769 # User test | 772 # User test |
770 # Date 0 0 | 773 # Date 0 0 |
771 # Thu Jan 01 00:00:00 1970 +0000 | 774 # Thu Jan 01 00:00:00 1970 +0000 |
772 # Node ID 57e9caedbcb8575a01c128db9d1bcbd624ef2115 | 775 # Node ID 501b330379955b6bf194dc99504a477b1f2d3f89 |
773 # Parent 41aff6a42b7578ec7ec3cb2041633f1ca43cca96 | 776 # Parent d300c8f961ceefede93601dbe478c701e2ff5995 |
774 SPAM SPAM | 777 SPAM SPAM |
775 | 778 |
776 diff --git a/shopping b/shopping | 779 diff --git a/shopping b/shopping |
777 --- a/shopping | 780 --- a/shopping |
778 +++ b/shopping | 781 +++ b/shopping |
781 +Spam Spam Spam Spam Spam Spam Spam Spam Spam | 784 +Spam Spam Spam Spam Spam Spam Spam Spam Spam |
782 Whizzo butter | 785 Whizzo butter |
783 Albatross | 786 Albatross |
784 Rat (rather a lot) | 787 Rat (rather a lot) |
785 | 788 |
786 To make sure I do not push unready changeset by mistake I set the "bathroom | 789 To make sure I do not push unfinished changeset by mistake I move the "bathroom |
787 stuff" changeset in the secret phase. | 790 stuff" changeset to the secret phase. |
788 | 791 |
789 $ hg phase --force --secret 10b8aeaa8cc8 | 792 $ hg phase --force --secret d1928babc208 |
790 | 793 |
791 we can now push our change: | 794 we can now push our change: |
792 | 795 |
793 $ hg push remote | 796 $ hg push remote |
794 pushing to $TESTTMP/remote (glob) | 797 pushing to $TESTTMP/remote (glob) |
797 adding manifests | 800 adding manifests |
798 adding file changes | 801 adding file changes |
799 added 3 changesets with 3 changes to 1 files | 802 added 3 changesets with 3 changes to 1 files |
800 5 new obsolescence markers | 803 5 new obsolescence markers |
801 | 804 |
802 for simplicity sake we get the bathroom change in line again | 805 for simplicity's sake we get the bathroom change in line again |
803 | 806 |
804 $ hg pick 10b8aeaa8cc8 | 807 $ hg pick d1928babc208 |
805 picking 8:10b8aeaa8cc8 "bathroom stuff" | 808 picking 8:d1928babc208 "bathroom stuff" |
806 merging shopping | 809 merging shopping |
807 $ hg phase --draft . | 810 $ hg phase --draft . |
808 $ hg log -G | 811 $ hg log -G |
809 @ 4710c0968793 (draft): bathroom stuff | 812 @ 39b19dc3d1e4 (draft): bathroom stuff |
810 | | 813 | |
811 o 57e9caedbcb8 (public): SPAM SPAM | 814 o 501b33037995 (public): SPAM SPAM |
812 | | 815 | |
813 o 41aff6a42b75 (public): adding fruit | 816 o d300c8f961ce (public): adding fruit |
814 | | 817 | |
815 o dfd3a2d7691e (public): adding condiment | 818 o 723e5a43d6d9 (public): adding condiment |
816 | | 819 | |
817 o 9ca060c80d74 (public): SPAM | 820 o 9ca060c80d74 (public): SPAM |
818 | | 821 | |
819 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 822 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
820 | 823 |
903 | 906 |
904 Splitting change | 907 Splitting change |
905 ------------------ | 908 ------------------ |
906 | 909 |
907 This part is not written yet, but you can use either the `histedit` extension | 910 This part is not written yet, but you can use either the `histedit` extension |
908 of the `uncommit` command to splitting a change. | 911 or the `uncommit` command to split a change. |
909 | 912 |
910 $ hg help uncommit | 913 $ hg help uncommit |
911 hg uncommit [OPTION]... [FILE]... | 914 hg uncommit [OPTION]... [FILE]... |
912 | 915 |
913 move changes from parent revision to working directory | 916 move changes from parent revision to working directory |
996 | 999 |
997 $ cd ../remote | 1000 $ cd ../remote |
998 $ hg -R ../local/ showconfig phases | 1001 $ hg -R ../local/ showconfig phases |
999 [1] | 1002 [1] |
1000 | 1003 |
1001 The localrepo does not have any specific configuration for `phases.publish`. It | 1004 The local repo does not have any specific configuration for `phases.publish`. |
1002 is ``true`` by default. | 1005 It is ``true`` by default. |
1003 | 1006 |
1004 $ hg pull local | 1007 $ hg pull local |
1005 pulling from $TESTTMP/local (glob) | 1008 pulling from $TESTTMP/local (glob) |
1006 searching for changes | 1009 searching for changes |
1007 adding changesets | 1010 adding changesets |
1008 adding manifests | 1011 adding manifests |
1009 adding file changes | 1012 adding file changes |
1010 added 1 changesets with 1 changes to 1 files | 1013 added 1 changesets with 1 changes to 1 files |
1011 1 new obsolescence markers | 1014 1 new obsolescence markers |
1012 new changesets 4710c0968793 | 1015 new changesets 39b19dc3d1e4 |
1013 (run 'hg update' to get a working copy) | 1016 (run 'hg update' to get a working copy) |
1014 $ hg log -G | 1017 $ hg log -G |
1015 o 4710c0968793 (public): bathroom stuff | 1018 o 39b19dc3d1e4 (public): bathroom stuff |
1016 | | 1019 | |
1017 o 57e9caedbcb8 (public): SPAM SPAM | 1020 o 501b33037995 (public): SPAM SPAM |
1018 | | 1021 | |
1019 o 41aff6a42b75 (public): adding fruit | 1022 o d300c8f961ce (public): adding fruit |
1020 | | 1023 | |
1021 o dfd3a2d7691e (public): adding condiment | 1024 o 723e5a43d6d9 (public): adding condiment |
1022 | | 1025 | |
1023 @ 9ca060c80d74 (public): SPAM | 1026 @ 9ca060c80d74 (public): SPAM |
1024 | | 1027 | |
1025 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1028 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1026 | 1029 |
1027 | 1030 |
1028 We do not want to publish the "bathroom changeset". Let's rollback the last transaction. | 1031 We do not want to publish the "bathroom changeset". Let's rollback the last transaction. |
1029 | 1032 |
1030 .. Warning: Rollback is actually a dangerous kind of internal command that is deprecated and should not be exposed to user. Please forget you read about it until someone fix this tutorial. | 1033 .. warning:: `rollback` is actually a dangerous kind of internal command that is deprecated and should not be exposed to user. Please forget you read about it until someone fix this tutorial. |
1031 | 1034 |
1032 $ hg rollback | 1035 $ hg rollback |
1033 repository tip rolled back to revision 4 (undo pull) | 1036 repository tip rolled back to revision 4 (undo pull) |
1034 $ hg log -G | 1037 $ hg log -G |
1035 o 57e9caedbcb8 (public): SPAM SPAM | 1038 o 501b33037995 (public): SPAM SPAM |
1036 | | 1039 | |
1037 o 41aff6a42b75 (public): adding fruit | 1040 o d300c8f961ce (public): adding fruit |
1038 | | 1041 | |
1039 o dfd3a2d7691e (public): adding condiment | 1042 o 723e5a43d6d9 (public): adding condiment |
1040 | | 1043 | |
1041 @ 9ca060c80d74 (public): SPAM | 1044 @ 9ca060c80d74 (public): SPAM |
1042 | | 1045 | |
1043 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1046 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1044 | 1047 |
1063 adding changesets | 1066 adding changesets |
1064 adding manifests | 1067 adding manifests |
1065 adding file changes | 1068 adding file changes |
1066 added 1 changesets with 1 changes to 1 files | 1069 added 1 changesets with 1 changes to 1 files |
1067 1 new obsolescence markers | 1070 1 new obsolescence markers |
1068 new changesets 4710c0968793 (1 drafts) | 1071 new changesets 39b19dc3d1e4 (1 drafts) |
1069 (run 'hg update' to get a working copy) | 1072 (run 'hg update' to get a working copy) |
1070 $ hg log -G | 1073 $ hg log -G |
1071 o 4710c0968793 (draft): bathroom stuff | 1074 o 39b19dc3d1e4 (draft): bathroom stuff |
1072 | | 1075 | |
1073 o 57e9caedbcb8 (public): SPAM SPAM | 1076 o 501b33037995 (public): SPAM SPAM |
1074 | | 1077 | |
1075 o 41aff6a42b75 (public): adding fruit | 1078 o d300c8f961ce (public): adding fruit |
1076 | | 1079 | |
1077 o dfd3a2d7691e (public): adding condiment | 1080 o 723e5a43d6d9 (public): adding condiment |
1078 | | 1081 | |
1079 @ 9ca060c80d74 (public): SPAM | 1082 @ 9ca060c80d74 (public): SPAM |
1080 | | 1083 | |
1081 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1084 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1082 | 1085 |
1084 Rebasing unstable change after pull | 1087 Rebasing unstable change after pull |
1085 ---------------------------------------------- | 1088 ---------------------------------------------- |
1086 | 1089 |
1087 Remotely someone add a new changeset on top of the mutable "bathroom" on. | 1090 Remotely someone add a new changeset on top of the mutable "bathroom" on. |
1088 | 1091 |
1089 $ hg up 4710c0968793 -q | 1092 $ hg up 39b19dc3d1e4 -q |
1090 $ cat >> shopping << EOF | 1093 $ cat >> shopping << EOF |
1091 > Giraffe | 1094 > Giraffe |
1092 > Rhino | 1095 > Rhino |
1093 > Lion | 1096 > Lion |
1094 > Bear | 1097 > Bear |
1096 $ hg ci -m 'animals' | 1099 $ hg ci -m 'animals' |
1097 | 1100 |
1098 But at the same time, locally, this same "bathroom changeset" was updated. | 1101 But at the same time, locally, this same "bathroom changeset" was updated. |
1099 | 1102 |
1100 $ cd ../local | 1103 $ cd ../local |
1101 $ hg up 4710c0968793 -q | 1104 $ hg up 39b19dc3d1e4 -q |
1102 $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping | 1105 $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping |
1103 $ hg commit --amend | 1106 $ hg commit --amend |
1104 $ hg log -G | 1107 $ hg log -G |
1105 @ 682004e81e71 (draft): bathroom stuff | 1108 @ 5486682f4225 (draft): bathroom stuff |
1106 | | 1109 | |
1107 o 57e9caedbcb8 (public): SPAM SPAM | 1110 o 501b33037995 (public): SPAM SPAM |
1108 | | 1111 | |
1109 o 41aff6a42b75 (public): adding fruit | 1112 o d300c8f961ce (public): adding fruit |
1110 | | 1113 | |
1111 o dfd3a2d7691e (public): adding condiment | 1114 o 723e5a43d6d9 (public): adding condiment |
1112 | | 1115 | |
1113 o 9ca060c80d74 (public): SPAM | 1116 o 9ca060c80d74 (public): SPAM |
1114 | | 1117 | |
1115 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1118 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1116 | 1119 |
1205 adding changesets | 1208 adding changesets |
1206 adding manifests | 1209 adding manifests |
1207 adding file changes | 1210 adding file changes |
1208 added 1 changesets with 1 changes to 1 files | 1211 added 1 changesets with 1 changes to 1 files |
1209 1 new orphan changesets | 1212 1 new orphan changesets |
1210 new changesets e4e4fa805d92 (1 drafts) | 1213 new changesets 0609f95eccab (1 drafts) |
1211 (run 'hg update' to get a working copy) | 1214 (run 'hg update' to get a working copy) |
1212 | 1215 |
1213 The new changeset "animal" is based on an old changeset of "bathroom". You can | 1216 The new changeset "animal" is based on an old changeset of "bathroom". You can |
1214 see both version showing up in the log. | 1217 see both version showing up in the log. |
1215 | 1218 |
1216 $ hg log -G | 1219 $ hg log -G |
1217 * e4e4fa805d92 (draft): animals | 1220 * 0609f95eccab (draft): animals |
1218 | | 1221 | |
1219 | @ 682004e81e71 (draft): bathroom stuff | 1222 | @ 5486682f4225 (draft): bathroom stuff |
1220 | | | 1223 | | |
1221 x | 4710c0968793 (draft): bathroom stuff | 1224 x | 39b19dc3d1e4 (draft): bathroom stuff |
1222 |/ | 1225 |/ |
1223 o 57e9caedbcb8 (public): SPAM SPAM | 1226 o 501b33037995 (public): SPAM SPAM |
1224 | | 1227 | |
1225 o 41aff6a42b75 (public): adding fruit | 1228 o d300c8f961ce (public): adding fruit |
1226 | | 1229 | |
1227 o dfd3a2d7691e (public): adding condiment | 1230 o 723e5a43d6d9 (public): adding condiment |
1228 | | 1231 | |
1229 o 9ca060c80d74 (public): SPAM | 1232 o 9ca060c80d74 (public): SPAM |
1230 | | 1233 | |
1231 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1234 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1232 | 1235 |
1340 11 -> 13 [arrowhead=none, | 1343 11 -> 13 [arrowhead=none, |
1341 penwidth=2.0]; | 1344 penwidth=2.0]; |
1342 } | 1345 } |
1343 #endif | 1346 #endif |
1344 | 1347 |
1345 The older version 75954b8cd933 never ceased to exist in the local repo. It was | 1348 The older version 39b19dc3d1e4 never ceased to exist in the local repo. It was |
1346 just hidden and excluded from pull and push. | 1349 just hidden and excluded from pull and push. |
1347 | 1350 |
1348 .. note:: In hgview there is a nice dotted relation highlighting a44c85f957d3 as a new version of 75954b8cd933. this is not yet ported to ``hg log -G``. | 1351 .. note:: In hgview there is a nice dotted relation highlighting 5486682f4225 as a new version of 39b19dc3d1e4. This is not yet ported to ``hg log -G``. |
1349 | 1352 |
1350 There is now an **unstable** changeset in this history. Mercurial will refuse to | 1353 There is now an **unstable** changeset in this history. Mercurial will refuse to |
1351 share it with the outside: | 1354 share it with the outside: |
1352 | 1355 |
1353 $ hg push other | 1356 $ hg push other |
1354 pushing to $TESTTMP/other (glob) | 1357 pushing to $TESTTMP/other (glob) |
1355 searching for changes | 1358 searching for changes |
1356 abort: push includes orphan changeset: e4e4fa805d92! | 1359 abort: push includes orphan changeset: 0609f95eccab! |
1357 (use 'hg evolve' to get a stable history or --force to ignore warnings) | 1360 (use 'hg evolve' to get a stable history or --force to ignore warnings) |
1358 [255] | 1361 [255] |
1359 | 1362 |
1360 | 1363 |
1361 To resolve this unstable state, you need to rebase bf1b0d202029 onto | 1364 To resolve this unstable state, you need to rebase 0609f95eccab onto |
1362 a44c85f957d3. The `hg evolve` command will do this for you. | 1365 5486682f4225. The `hg evolve` command will do this for you. |
1363 | 1366 |
1364 It has a --dry-run option to only suggest the next move. | 1367 It has a --dry-run option to only suggest the next move. |
1365 | 1368 |
1366 $ hg evolve --dry-run | 1369 $ hg evolve --dry-run |
1367 move:[13] animals | 1370 move:[13] animals |
1368 atop:[12] bathroom stuff | 1371 atop:[12] bathroom stuff |
1369 hg rebase -r e4e4fa805d92 -d 682004e81e71 | 1372 hg rebase -r 0609f95eccab -d 5486682f4225 |
1370 | 1373 |
1371 Let's do it | 1374 Let's do it |
1372 | 1375 |
1373 $ hg evolve | 1376 $ hg evolve |
1374 move:[13] animals | 1377 move:[13] animals |
1376 merging shopping | 1379 merging shopping |
1377 | 1380 |
1378 The old version of bathroom is hidden again. | 1381 The old version of bathroom is hidden again. |
1379 | 1382 |
1380 $ hg log -G | 1383 $ hg log -G |
1381 o 2a2b36e14660 (draft): animals | 1384 o 3266db1117c9 (draft): animals |
1382 | | 1385 | |
1383 @ 682004e81e71 (draft): bathroom stuff | 1386 @ 5486682f4225 (draft): bathroom stuff |
1384 | | 1387 | |
1385 o 57e9caedbcb8 (public): SPAM SPAM | 1388 o 501b33037995 (public): SPAM SPAM |
1386 | | 1389 | |
1387 o 41aff6a42b75 (public): adding fruit | 1390 o d300c8f961ce (public): adding fruit |
1388 | | 1391 | |
1389 o dfd3a2d7691e (public): adding condiment | 1392 o 723e5a43d6d9 (public): adding condiment |
1390 | | 1393 | |
1391 o 9ca060c80d74 (public): SPAM | 1394 o 9ca060c80d74 (public): SPAM |
1392 | | 1395 | |
1393 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1396 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1394 | 1397 |
1514 no changes found | 1517 no changes found |
1515 | 1518 |
1516 Now let's see where we are, and update to the successor. | 1519 Now let's see where we are, and update to the successor. |
1517 | 1520 |
1518 $ hg parents | 1521 $ hg parents |
1519 e4e4fa805d92 (draft): animals | 1522 0609f95eccab (draft): animals |
1520 working directory parent is obsolete! (e4e4fa805d92) | 1523 working directory parent is obsolete! (0609f95eccab) |
1521 (use 'hg evolve' to update to its successor: 2a2b36e14660) | 1524 (use 'hg evolve' to update to its successor: 3266db1117c9) |
1522 $ hg evolve | 1525 $ hg evolve |
1523 update:[8] animals | 1526 update:[8] animals |
1524 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1527 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1525 working directory is now at 2a2b36e14660 | 1528 working directory is now at 3266db1117c9 |
1526 | 1529 |
1527 Relocating unstable change after prune | 1530 Relocating unstable change after prune |
1528 ---------------------------------------------- | 1531 ---------------------------------------------- |
1529 | 1532 |
1530 The remote guy keeps working. | 1533 The remote guy keeps working. |
1540 searching for changes | 1543 searching for changes |
1541 adding changesets | 1544 adding changesets |
1542 adding manifests | 1545 adding manifests |
1543 adding file changes | 1546 adding file changes |
1544 added 1 changesets with 1 changes to 1 files | 1547 added 1 changesets with 1 changes to 1 files |
1545 new changesets fc41faf45288 (1 drafts) | 1548 new changesets fff8c3d068b6 (1 drafts) |
1546 (run 'hg update' to get a working copy) | 1549 (run 'hg update' to get a working copy) |
1547 $ hg log -G | 1550 $ hg log -G |
1548 o fc41faf45288 (draft): SPAM SPAM SPAM | 1551 o fff8c3d068b6 (draft): SPAM SPAM SPAM |
1549 | | 1552 | |
1550 @ 2a2b36e14660 (draft): animals | 1553 @ 3266db1117c9 (draft): animals |
1551 | | 1554 | |
1552 o 682004e81e71 (draft): bathroom stuff | 1555 o 5486682f4225 (draft): bathroom stuff |
1553 | | 1556 | |
1554 o 57e9caedbcb8 (public): SPAM SPAM | 1557 o 501b33037995 (public): SPAM SPAM |
1555 | | 1558 | |
1556 o 41aff6a42b75 (public): adding fruit | 1559 o d300c8f961ce (public): adding fruit |
1557 | | 1560 | |
1558 o dfd3a2d7691e (public): adding condiment | 1561 o 723e5a43d6d9 (public): adding condiment |
1559 | | 1562 | |
1560 o 9ca060c80d74 (public): SPAM | 1563 o 9ca060c80d74 (public): SPAM |
1561 | | 1564 | |
1562 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1565 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1563 | 1566 |
1668 } | 1671 } |
1669 #endif | 1672 #endif |
1670 | 1673 |
1671 In the mean time I noticed you can't buy animals in a super market and I prune the animal changeset: | 1674 In the mean time I noticed you can't buy animals in a super market and I prune the animal changeset: |
1672 | 1675 |
1673 $ hg prune 2a2b36e14660 | 1676 $ hg prune 3266db1117c9 |
1674 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1677 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1675 working directory is now at 682004e81e71 | 1678 working directory is now at 5486682f4225 |
1676 1 changesets pruned | 1679 1 changesets pruned |
1677 1 new orphan changesets | 1680 1 new orphan changesets |
1678 | 1681 |
1679 | 1682 |
1680 The animals changeset is still displayed because the "SPAM SPAM SPAM" changeset | 1683 The animals changeset is still displayed because the "SPAM SPAM SPAM" changeset |
1681 is neither dead or obsolete. My repository is in an unstable state again. | 1684 is neither dead or obsolete. My repository is in an unstable state again. |
1682 | 1685 |
1683 $ hg log -G | 1686 $ hg log -G |
1684 * fc41faf45288 (draft): SPAM SPAM SPAM | 1687 * fff8c3d068b6 (draft): SPAM SPAM SPAM |
1685 | | 1688 | |
1686 x 2a2b36e14660 (draft): animals | 1689 x 3266db1117c9 (draft): animals |
1687 | | 1690 | |
1688 @ 682004e81e71 (draft): bathroom stuff | 1691 @ 5486682f4225 (draft): bathroom stuff |
1689 | | 1692 | |
1690 o 57e9caedbcb8 (public): SPAM SPAM | 1693 o 501b33037995 (public): SPAM SPAM |
1691 | | 1694 | |
1692 o 41aff6a42b75 (public): adding fruit | 1695 o d300c8f961ce (public): adding fruit |
1693 | | 1696 | |
1694 o dfd3a2d7691e (public): adding condiment | 1697 o 723e5a43d6d9 (public): adding condiment |
1695 | | 1698 | |
1696 o 9ca060c80d74 (public): SPAM | 1699 o 9ca060c80d74 (public): SPAM |
1697 | | 1700 | |
1698 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1701 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1699 | 1702 |
1803 penwidth=2.0]; | 1806 penwidth=2.0]; |
1804 } | 1807 } |
1805 #endif | 1808 #endif |
1806 | 1809 |
1807 $ hg log -r "orphan()" | 1810 $ hg log -r "orphan()" |
1808 fc41faf45288 (draft): SPAM SPAM SPAM | 1811 fff8c3d068b6 (draft): SPAM SPAM SPAM |
1809 | 1812 |
1810 #if docgraph-ext | 1813 #if docgraph-ext |
1811 $ hg docgraph -r "orphan()" --sphinx-directive --rankdir LR #rest-ignore | 1814 $ hg docgraph -r "orphan()" --sphinx-directive --rankdir LR #rest-ignore |
1812 .. graphviz:: | 1815 .. graphviz:: |
1813 | 1816 |
1834 | 1837 |
1835 $ hg evolve --update | 1838 $ hg evolve --update |
1836 move:[15] SPAM SPAM SPAM | 1839 move:[15] SPAM SPAM SPAM |
1837 atop:[12] bathroom stuff | 1840 atop:[12] bathroom stuff |
1838 merging shopping | 1841 merging shopping |
1839 working directory is now at e6cfcb672150 | 1842 working directory is now at c33e56ec23a8 |
1840 | 1843 |
1841 $ hg log -G | 1844 $ hg log -G |
1842 @ e6cfcb672150 (draft): SPAM SPAM SPAM | 1845 @ c33e56ec23a8 (draft): SPAM SPAM SPAM |
1843 | | 1846 | |
1844 o 682004e81e71 (draft): bathroom stuff | 1847 o 5486682f4225 (draft): bathroom stuff |
1845 | | 1848 | |
1846 o 57e9caedbcb8 (public): SPAM SPAM | 1849 o 501b33037995 (public): SPAM SPAM |
1847 | | 1850 | |
1848 o 41aff6a42b75 (public): adding fruit | 1851 o d300c8f961ce (public): adding fruit |
1849 | | 1852 | |
1850 o dfd3a2d7691e (public): adding condiment | 1853 o 723e5a43d6d9 (public): adding condiment |
1851 | | 1854 | |
1852 o 9ca060c80d74 (public): SPAM | 1855 o 9ca060c80d74 (public): SPAM |
1853 | | 1856 | |
1854 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1857 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1855 | 1858 |