Mercurial > evolve
comparison tests/test-tutorial.t @ 6885:2cad3669e4bb stable
tests: small fixes to the user-visible text in test-tutorial.t
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 02 Oct 2024 20:30:06 +0400 |
parents | 053ce6e0b3b7 |
children | 2540c03e1bf2 |
comparison
equal
deleted
inserted
replaced
6884:053ce6e0b3b7 | 6885:2cad3669e4bb |
---|---|
100 adding changesets | 100 adding changesets |
101 adding manifests | 101 adding manifests |
102 adding file changes | 102 adding file changes |
103 added 1 changesets with 1 changes to 1 files | 103 added 1 changesets with 1 changes to 1 files |
104 | 104 |
105 Later I add additional item to my list | 105 Later I add additional items to my list |
106 | 106 |
107 $ cat >> shopping << EOF | 107 $ cat >> shopping << EOF |
108 > Egg | 108 > Egg |
109 > Suggar | 109 > Suggar |
110 > Vinegar | 110 > Vinegar |
116 > Pear | 116 > Pear |
117 > Apple | 117 > Apple |
118 > EOF | 118 > EOF |
119 $ hg commit -m "adding fruit" | 119 $ hg commit -m "adding fruit" |
120 | 120 |
121 This history is very linear | 121 The history is completely linear so far |
122 | 122 |
123 $ hg log -G | 123 $ hg log -G |
124 @ d85de4546133 (draft): adding fruit | 124 @ d85de4546133 (draft): adding fruit |
125 | | 125 | |
126 o 4d5dc8187023 (draft): adding condiment | 126 o 4d5dc8187023 (draft): adding condiment |
171 1 -> 2 [arrowhead=none, | 171 1 -> 2 [arrowhead=none, |
172 penwidth=2.0]; | 172 penwidth=2.0]; |
173 } | 173 } |
174 #endif | 174 #endif |
175 | 175 |
176 But a typo was made in Babanas! | 176 But a typo was made in Bananas! |
177 | 177 |
178 $ hg export tip | 178 $ hg export tip |
179 # HG changeset patch | 179 # HG changeset patch |
180 # User test | 180 # User test |
181 # Date 0 0 | 181 # Date 0 0 |
194 +Bananos | 194 +Bananos |
195 +Pear | 195 +Pear |
196 +Apple | 196 +Apple |
197 | 197 |
198 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 |
199 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). |
200 | 200 |
201 $ hg log -G | 201 $ hg log -G |
202 @ d85de4546133 (draft): adding fruit | 202 @ d85de4546133 (draft): adding fruit |
203 | | 203 | |
204 o 4d5dc8187023 (draft): adding condiment | 204 o 4d5dc8187023 (draft): adding condiment |
250 1 -> 2 [arrowhead=none, | 250 1 -> 2 [arrowhead=none, |
251 penwidth=2.0]; | 251 penwidth=2.0]; |
252 } | 252 } |
253 #endif | 253 #endif |
254 | 254 |
255 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! |
256 | 256 |
257 $ sed -i'' -e s/Bananos/Banana/ shopping | 257 $ sed -i'' -e s/Bananos/Banana/ shopping |
258 $ hg diff | 258 $ hg diff |
259 diff --git a/shopping b/shopping | 259 diff --git a/shopping b/shopping |
260 --- a/shopping | 260 --- a/shopping |
267 +Banana | 267 +Banana |
268 Pear | 268 Pear |
269 Apple | 269 Apple |
270 $ hg commit --amend | 270 $ hg commit --amend |
271 | 271 |
272 A new changeset with the right diff replace the wrong one. | 272 A new changeset with the correct changes replaces the old one. |
273 | 273 |
274 $ hg log -G | 274 $ hg log -G |
275 @ 9d0363b81950 (draft): adding fruit | 275 @ 9d0363b81950 (draft): adding fruit |
276 | | 276 | |
277 o 4d5dc8187023 (draft): adding condiment | 277 o 4d5dc8187023 (draft): adding condiment |
345 +Apple | 345 +Apple |
346 | 346 |
347 Getting rid of branchy history | 347 Getting rid of branchy history |
348 ---------------------------------- | 348 ---------------------------------- |
349 | 349 |
350 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. |
351 | 351 |
352 $ cd ../remote | 352 $ cd ../remote |
353 $ hg up -q | 353 $ hg up -q |
354 $ sed -i'' -e 's/Spam/Spam Spam Spam/' shopping | 354 $ sed -i'' -e 's/Spam/Spam Spam Spam/' shopping |
355 $ hg ci -m 'SPAM' | 355 $ hg ci -m 'SPAM' |
538 o 9ca060c80d74 (public): SPAM | 538 o 9ca060c80d74 (public): SPAM |
539 | | 539 | |
540 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 540 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
541 | 541 |
542 | 542 |
543 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 |
544 not fit well in my standard shopping list) | 544 does not fit well in my standard shopping list) |
545 | 545 |
546 $ hg prune . # "." is for working directory parent | 546 $ hg prune . # "." is for working directory parent |
547 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 |
548 working directory is now at 41aff6a42b75 | 548 working directory is now at 41aff6a42b75 |
549 1 changesets pruned | 549 1 changesets pruned |
630 > Toothbrush | 630 > Toothbrush |
631 > ... More bathroom stuff to come | 631 > ... More bathroom stuff to come |
632 > Towel | 632 > Towel |
633 > Soap | 633 > Soap |
634 > EOF | 634 > EOF |
635 $ hg ci -m 'bathroom stuff' -q # XXX remove the -q | 635 $ hg ci -m 'bathroom stuff' |
636 | 636 |
637 $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping | 637 $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping |
638 $ hg ci -m 'SPAM SPAM' | 638 $ hg ci -m 'SPAM SPAM' |
639 $ hg log -G | 639 $ hg log -G |
640 @ fac207dec9f5 (draft): SPAM SPAM | 640 @ fac207dec9f5 (draft): SPAM SPAM |
650 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 650 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
651 | 651 |
652 | 652 |
653 .. 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. |
654 | 654 |
655 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 |
656 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 |
657 "SPAM SPAM" which is not a child of "bathroom stuff" | 657 "SPAM SPAM" which is not a child of "bathroom stuff". |
658 | 658 |
659 You can use the 'grab' alias for that. | 659 You can use the 'grab' command for that. |
660 | 660 |
661 .. 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>` |
662 | 662 |
663 $ hg up 'p1(10b8aeaa8cc8)' # going on "bathroom stuff" parent | 663 $ hg up 'p1(10b8aeaa8cc8)' # going on "bathroom stuff" parent |
664 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 |
665 $ hg pick fac207dec9f5 # moving "SPAM SPAM" to the working directory parent | 665 $ hg pick fac207dec9f5 # moving "SPAM SPAM" to the working directory parent |
666 picking 9:fac207dec9f5 "SPAM SPAM" | 666 picking 9:fac207dec9f5 "SPAM SPAM" |
759 6 -> 10 [arrowhead=none, | 759 6 -> 10 [arrowhead=none, |
760 penwidth=2.0]; | 760 penwidth=2.0]; |
761 } | 761 } |
762 #endif | 762 #endif |
763 | 763 |
764 We have a new SPAM SPAM version without the bathroom stuff | 764 We have a new version of "SPAM SPAM" without the bathroom stuff |
765 | 765 |
766 $ grep Spam shopping # enough spam | 766 $ grep Spam shopping # enough spam |
767 Spam Spam Spam Spam Spam Spam Spam Spam Spam | 767 Spam Spam Spam Spam Spam Spam Spam Spam Spam |
768 $ grep Toothbrush shopping # no Toothbrush | 768 $ grep Toothbrush shopping # no Toothbrush |
769 [1] | 769 [1] |
784 +Spam Spam Spam Spam Spam Spam Spam Spam Spam | 784 +Spam Spam Spam Spam Spam Spam Spam Spam Spam |
785 Whizzo butter | 785 Whizzo butter |
786 Albatross | 786 Albatross |
787 Rat (rather a lot) | 787 Rat (rather a lot) |
788 | 788 |
789 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 |
790 stuff" changeset in the secret phase. | 790 stuff" changeset to the secret phase. |
791 | 791 |
792 $ hg phase --force --secret 10b8aeaa8cc8 | 792 $ hg phase --force --secret 10b8aeaa8cc8 |
793 | 793 |
794 we can now push our change: | 794 we can now push our change: |
795 | 795 |
800 adding manifests | 800 adding manifests |
801 adding file changes | 801 adding file changes |
802 added 3 changesets with 3 changes to 1 files | 802 added 3 changesets with 3 changes to 1 files |
803 5 new obsolescence markers | 803 5 new obsolescence markers |
804 | 804 |
805 for simplicity sake we get the bathroom change in line again | 805 for simplicity's sake we get the bathroom change in line again |
806 | 806 |
807 $ hg pick 10b8aeaa8cc8 | 807 $ hg pick 10b8aeaa8cc8 |
808 picking 8:10b8aeaa8cc8 "bathroom stuff" | 808 picking 8:10b8aeaa8cc8 "bathroom stuff" |
809 merging shopping | 809 merging shopping |
810 $ hg phase --draft . | 810 $ hg phase --draft . |
906 | 906 |
907 Splitting change | 907 Splitting change |
908 ------------------ | 908 ------------------ |
909 | 909 |
910 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 |
911 of the `uncommit` command to splitting a change. | 911 or the `uncommit` command to split a change. |
912 | 912 |
913 $ hg help uncommit | 913 $ hg help uncommit |
914 hg uncommit [OPTION]... [FILE]... | 914 hg uncommit [OPTION]... [FILE]... |
915 | 915 |
916 move changes from parent revision to working directory | 916 move changes from parent revision to working directory |
999 | 999 |
1000 $ cd ../remote | 1000 $ cd ../remote |
1001 $ hg -R ../local/ showconfig phases | 1001 $ hg -R ../local/ showconfig phases |
1002 [1] | 1002 [1] |
1003 | 1003 |
1004 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`. |
1005 is ``true`` by default. | 1005 It is ``true`` by default. |
1006 | 1006 |
1007 $ hg pull local | 1007 $ hg pull local |
1008 pulling from $TESTTMP/local (glob) | 1008 pulling from $TESTTMP/local (glob) |
1009 searching for changes | 1009 searching for changes |
1010 adding changesets | 1010 adding changesets |
1028 o 7e82d3f3c2cb (public): Monthy Python Shopping list | 1028 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
1029 | 1029 |
1030 | 1030 |
1031 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. |
1032 | 1032 |
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. | 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. |
1034 | 1034 |
1035 $ hg rollback | 1035 $ hg rollback |
1036 repository tip rolled back to revision 4 (undo pull) | 1036 repository tip rolled back to revision 4 (undo pull) |
1037 $ hg log -G | 1037 $ hg log -G |
1038 o 57e9caedbcb8 (public): SPAM SPAM | 1038 o 57e9caedbcb8 (public): SPAM SPAM |
1346 #endif | 1346 #endif |
1347 | 1347 |
1348 The older version 75954b8cd933 never ceased to exist in the local repo. It was | 1348 The older version 75954b8cd933 never ceased to exist in the local repo. It was |
1349 just hidden and excluded from pull and push. | 1349 just hidden and excluded from pull and push. |
1350 | 1350 |
1351 .. 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 a44c85f957d3 as a new version of 75954b8cd933. This is not yet ported to ``hg log -G``. |
1352 | 1352 |
1353 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 |
1354 share it with the outside: | 1354 share it with the outside: |
1355 | 1355 |
1356 $ hg push other | 1356 $ hg push other |