Mercurial > evolve
diff tests/test-tutorial.t @ 6910:038df334d51a mercurial-6.0
test-compat: merge mercurial-6.1 into mercurial-6.0
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 25 Oct 2024 15:50:15 +0400 |
parents | 45cbf0af48e7 |
children | 237f99ee3d64 |
line wrap: on
line diff
--- a/tests/test-tutorial.t Wed Jun 26 15:39:36 2024 +0400 +++ b/tests/test-tutorial.t Fri Oct 25 15:50:15 2024 +0400 @@ -1,3 +1,6 @@ +=============== +Evolve Tutorial +=============== Initial setup ------------- @@ -99,11 +102,11 @@ adding file changes added 1 changesets with 1 changes to 1 files -Later I add additional item to my list +Later I add additional items to my list $ cat >> shopping << EOF > Egg - > Suggar + > Sugar > Vinegar > Oil > EOF @@ -115,12 +118,12 @@ > EOF $ hg commit -m "adding fruit" -This history is very linear +The history is completely linear so far $ hg log -G - @ d85de4546133 (draft): adding fruit + @ 4296f0622469 (draft): adding fruit | - o 4d5dc8187023 (draft): adding condiment + o 63ae8c44f4b6 (draft): adding condiment | o 7e82d3f3c2cb (public): Monthy Python Shopping list @@ -170,22 +173,22 @@ } #endif -But a typo was made in Babanas! +But a typo was made in Bananas! $ hg export tip # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID d85de4546133030c82d257bbcdd9b1b416d0c31c - # Parent 4d5dc81870237d492284826e21840b2ca00e26d1 + # Node ID 4296f0622469c1527d5dc020cf72bd7732c44c64 + # Parent 63ae8c44f4b6274d5580b4eea41a87623301c3e9 adding fruit diff --git a/shopping b/shopping --- a/shopping +++ b/shopping @@ -9,3 +9,6 @@ - Suggar + Sugar Vinegar Oil +Bananos @@ -193,12 +196,12 @@ +Apple The faulty changeset is in the "draft" phase because it has not been exchanged with -the outside. The first one has been exchanged and is "public" (immutable). +the outside yet. The first one has been exchanged and is "public" (immutable). $ hg log -G - @ d85de4546133 (draft): adding fruit + @ 4296f0622469 (draft): adding fruit | - o 4d5dc8187023 (draft): adding condiment + o 63ae8c44f4b6 (draft): adding condiment | o 7e82d3f3c2cb (public): Monthy Python Shopping list @@ -249,7 +252,7 @@ } #endif -Hopefully. I can use `hg commit --amend` to rewrite my faulty changeset! +Luckily, I can use `hg commit --amend` to rewrite my faulty changeset! $ sed -i'' -e s/Bananos/Banana/ shopping $ hg diff @@ -257,7 +260,7 @@ --- a/shopping +++ b/shopping @@ -9,6 +9,6 @@ - Suggar + Sugar Vinegar Oil -Bananos @@ -266,12 +269,12 @@ Apple $ hg commit --amend -A new changeset with the right diff replace the wrong one. +A new changeset with the correct changes replaces the old one. $ hg log -G - @ 9d0363b81950 (draft): adding fruit + @ 6445b365ad1c (draft): adding fruit | - o 4d5dc8187023 (draft): adding condiment + o 63ae8c44f4b6 (draft): adding condiment | o 7e82d3f3c2cb (public): Monthy Python Shopping list @@ -326,15 +329,15 @@ # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 9d0363b81950646bc6ad1ec5de8b8197ea586541 - # Parent 4d5dc81870237d492284826e21840b2ca00e26d1 + # Node ID 6445b365ad1c4905e7a120e45242d9f4b51ec48f + # Parent 63ae8c44f4b6274d5580b4eea41a87623301c3e9 adding fruit diff --git a/shopping b/shopping --- a/shopping +++ b/shopping @@ -9,3 +9,6 @@ - Suggar + Sugar Vinegar Oil +Banana @@ -344,7 +347,7 @@ Getting rid of branchy history ---------------------------------- -While I was working on my list. Someone made a change remotely. +While I was working on my list, someone made a change remotely. $ cd ../remote $ hg up -q @@ -369,9 +372,9 @@ $ hg log -G o 9ca060c80d74 (public): SPAM | - | @ 9d0363b81950 (draft): adding fruit + | @ 6445b365ad1c (draft): adding fruit | | - | o 4d5dc8187023 (draft): adding condiment + | o 63ae8c44f4b6 (draft): adding condiment |/ o 7e82d3f3c2cb (public): Monthy Python Shopping list @@ -437,19 +440,19 @@ Instead of merging my head with the new one. I'm going to rebase my work $ hg diff - $ hg rebase --dest 9ca060c80d74 --source 4d5dc8187023 - rebasing 1:4d5dc8187023 "adding condiment" + $ hg rebase --dest 9ca060c80d74 --source 63ae8c44f4b6 + rebasing 1:63ae8c44f4b6 "adding condiment" merging shopping - rebasing 3:9d0363b81950 "adding fruit" + rebasing 3:6445b365ad1c "adding fruit" merging shopping My local work is now rebased on the remote one. $ hg log -G - @ 41aff6a42b75 (draft): adding fruit + @ d300c8f961ce (draft): adding fruit | - o dfd3a2d7691e (draft): adding condiment + o 723e5a43d6d9 (draft): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -526,31 +529,31 @@ > EOF $ hg ci -m 'transport' $ hg log -G - @ 1125e39fbf21 (draft): transport + @ 7f938a07ecb2 (draft): transport | - o 41aff6a42b75 (draft): adding fruit + o d300c8f961ce (draft): adding fruit | - o dfd3a2d7691e (draft): adding condiment + o 723e5a43d6d9 (draft): adding condiment | o 9ca060c80d74 (public): SPAM | o 7e82d3f3c2cb (public): Monthy Python Shopping list -I have a new commit but I realize that don't want it. (Transport shop list does -not fit well in my standard shopping list) +I have a new commit but I realize that don't want it. (Transport shopping list +does not fit well in my standard shopping list) $ hg prune . # "." is for working directory parent 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 41aff6a42b75 + working directory is now at d300c8f961ce 1 changesets pruned The silly changeset is gone. $ hg log -G - @ 41aff6a42b75 (draft): adding fruit + @ d300c8f961ce (draft): adding fruit | - o dfd3a2d7691e (draft): adding condiment + o 723e5a43d6d9 (draft): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -629,18 +632,18 @@ > Towel > Soap > EOF - $ hg ci -m 'bathroom stuff' -q # XXX remove the -q + $ hg ci -m 'bathroom stuff' $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping $ hg ci -m 'SPAM SPAM' $ hg log -G - @ fac207dec9f5 (draft): SPAM SPAM + @ 1c877d31b53f (draft): SPAM SPAM | - o 10b8aeaa8cc8 (draft): bathroom stuff + o d1928babc208 (draft): bathroom stuff | - o 41aff6a42b75 (draft): adding fruit + o d300c8f961ce (draft): adding fruit | - o dfd3a2d7691e (draft): adding condiment + o 723e5a43d6d9 (draft): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -649,27 +652,27 @@ .. note:: We can't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable. - I now want to push to remote all my changes except the bathroom one, which I'm - not totally happy with yet. To be able to push "SPAM SPAM" I need a version of - "SPAM SPAM" which is not a child of "bathroom stuff" +I now want to push to remote all my changes except the bathroom one, which I'm +not totally happy with yet. To be able to push "SPAM SPAM" I need a version of +"SPAM SPAM" which is not a child of "bathroom stuff". -You can use the 'grab' alias for that. +You can use the 'grab' command for that. -.. note: grab is an alias for `hg rebase --dest . --rev <target>; hg up <there>` +.. note:: `grab` is an alias for `hg rebase --dest . --rev <target>; hg up <result>` - $ hg up 'p1(10b8aeaa8cc8)' # going on "bathroom stuff" parent + $ hg up 'p1(d1928babc208)' # going on "bathroom stuff" parent 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg pick fac207dec9f5 # moving "SPAM SPAM" to the working directory parent - picking 9:fac207dec9f5 "SPAM SPAM" + $ hg pick 1c877d31b53f # moving "SPAM SPAM" to the working directory parent + picking 9:1c877d31b53f "SPAM SPAM" merging shopping $ hg log -G - @ 57e9caedbcb8 (draft): SPAM SPAM + @ 501b33037995 (draft): SPAM SPAM | - | o 10b8aeaa8cc8 (draft): bathroom stuff + | o d1928babc208 (draft): bathroom stuff |/ - o 41aff6a42b75 (draft): adding fruit + o d300c8f961ce (draft): adding fruit | - o dfd3a2d7691e (draft): adding condiment + o 723e5a43d6d9 (draft): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -758,7 +761,7 @@ } #endif -We have a new SPAM SPAM version without the bathroom stuff +We have a new version of "SPAM SPAM" without the bathroom stuff $ grep Spam shopping # enough spam Spam Spam Spam Spam Spam Spam Spam Spam Spam @@ -769,8 +772,8 @@ # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 57e9caedbcb8575a01c128db9d1bcbd624ef2115 - # Parent 41aff6a42b7578ec7ec3cb2041633f1ca43cca96 + # Node ID 501b330379955b6bf194dc99504a477b1f2d3f89 + # Parent d300c8f961ceefede93601dbe478c701e2ff5995 SPAM SPAM diff --git a/shopping b/shopping @@ -783,10 +786,10 @@ Albatross Rat (rather a lot) -To make sure I do not push unready changeset by mistake I set the "bathroom -stuff" changeset in the secret phase. +To make sure I do not push unfinished changeset by mistake I move the "bathroom +stuff" changeset to the secret phase. - $ hg phase --force --secret 10b8aeaa8cc8 + $ hg phase --force --secret d1928babc208 we can now push our change: @@ -799,20 +802,20 @@ added 3 changesets with 3 changes to 1 files 5 new obsolescence markers -for simplicity sake we get the bathroom change in line again +for simplicity's sake we get the bathroom change in line again - $ hg pick 10b8aeaa8cc8 - picking 8:10b8aeaa8cc8 "bathroom stuff" + $ hg pick d1928babc208 + picking 8:d1928babc208 "bathroom stuff" merging shopping $ hg phase --draft . $ hg log -G - @ 4710c0968793 (draft): bathroom stuff + @ 39b19dc3d1e4 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -905,7 +908,7 @@ ------------------ This part is not written yet, but you can use either the `histedit` extension -of the `uncommit` command to splitting a change. +or the `uncommit` command to split a change. $ hg help uncommit hg uncommit [OPTION]... [FILE]... @@ -998,8 +1001,8 @@ $ hg -R ../local/ showconfig phases [1] -The localrepo does not have any specific configuration for `phases.publish`. It -is ``true`` by default. +The local repo does not have any specific configuration for `phases.publish`. +It is ``true`` by default. $ hg pull local pulling from $TESTTMP/local (glob) @@ -1009,16 +1012,16 @@ adding file changes added 1 changesets with 1 changes to 1 files 1 new obsolescence markers - new changesets 4710c0968793 + new changesets 39b19dc3d1e4 (run 'hg update' to get a working copy) $ hg log -G - o 4710c0968793 (public): bathroom stuff + o 39b19dc3d1e4 (public): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | @ 9ca060c80d74 (public): SPAM | @@ -1027,16 +1030,16 @@ We do not want to publish the "bathroom changeset". Let's rollback the last transaction. -.. 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. +.. 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. $ hg rollback repository tip rolled back to revision 4 (undo pull) $ hg log -G - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | @ 9ca060c80d74 (public): SPAM | @@ -1065,16 +1068,16 @@ adding file changes added 1 changesets with 1 changes to 1 files 1 new obsolescence markers - new changesets 4710c0968793 (1 drafts) + new changesets 39b19dc3d1e4 (1 drafts) (run 'hg update' to get a working copy) $ hg log -G - o 4710c0968793 (draft): bathroom stuff + o 39b19dc3d1e4 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | @ 9ca060c80d74 (public): SPAM | @@ -1086,7 +1089,7 @@ Remotely someone add a new changeset on top of the mutable "bathroom" on. - $ hg up 4710c0968793 -q + $ hg up 39b19dc3d1e4 -q $ cat >> shopping << EOF > Giraffe > Rhino @@ -1098,17 +1101,17 @@ But at the same time, locally, this same "bathroom changeset" was updated. $ cd ../local - $ hg up 4710c0968793 -q + $ hg up 39b19dc3d1e4 -q $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping $ hg commit --amend $ hg log -G - @ 682004e81e71 (draft): bathroom stuff + @ 5486682f4225 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -1207,24 +1210,24 @@ adding file changes added 1 changesets with 1 changes to 1 files 1 new orphan changesets - new changesets e4e4fa805d92 (1 drafts) + new changesets 0609f95eccab (1 drafts) (run 'hg update' to get a working copy) The new changeset "animal" is based on an old changeset of "bathroom". You can see both version showing up in the log. $ hg log -G - * e4e4fa805d92 (draft): animals + * 0609f95eccab (draft): animals | - | @ 682004e81e71 (draft): bathroom stuff + | @ 5486682f4225 (draft): bathroom stuff | | - x | 4710c0968793 (draft): bathroom stuff + x | 39b19dc3d1e4 (draft): bathroom stuff |/ - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -1342,10 +1345,10 @@ } #endif -The older version 75954b8cd933 never ceased to exist in the local repo. It was +The older version 39b19dc3d1e4 never ceased to exist in the local repo. It was just hidden and excluded from pull and push. -.. 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``. +.. 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``. There is now an **unstable** changeset in this history. Mercurial will refuse to share it with the outside: @@ -1353,20 +1356,20 @@ $ hg push other pushing to $TESTTMP/other (glob) searching for changes - abort: push includes orphan changeset: e4e4fa805d92! + abort: push includes orphan changeset: 0609f95eccab! (use 'hg evolve' to get a stable history or --force to ignore warnings) [255] -To resolve this unstable state, you need to rebase bf1b0d202029 onto -a44c85f957d3. The `hg evolve` command will do this for you. +To resolve this unstable state, you need to rebase 0609f95eccab onto +5486682f4225. The `hg evolve` command will do this for you. It has a --dry-run option to only suggest the next move. $ hg evolve --dry-run move:[13] animals atop:[12] bathroom stuff - hg rebase -r e4e4fa805d92 -d 682004e81e71 + hg rebase -r 0609f95eccab -d 5486682f4225 Let's do it @@ -1378,15 +1381,15 @@ The old version of bathroom is hidden again. $ hg log -G - o 2a2b36e14660 (draft): animals + o 3266db1117c9 (draft): animals | - @ 682004e81e71 (draft): bathroom stuff + @ 5486682f4225 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -1516,13 +1519,13 @@ Now let's see where we are, and update to the successor. $ hg parents - e4e4fa805d92 (draft): animals - working directory parent is obsolete! (e4e4fa805d92) - (use 'hg evolve' to update to its successor: 2a2b36e14660) + 0609f95eccab (draft): animals + working directory parent is obsolete! (0609f95eccab) + (use 'hg evolve' to update to its successor: 3266db1117c9) $ hg evolve update:[8] animals 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 2a2b36e14660 + working directory is now at 3266db1117c9 Relocating unstable change after prune ---------------------------------------------- @@ -1542,20 +1545,20 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - new changesets fc41faf45288 (1 drafts) + new changesets fff8c3d068b6 (1 drafts) (run 'hg update' to get a working copy) $ hg log -G - o fc41faf45288 (draft): SPAM SPAM SPAM + o fff8c3d068b6 (draft): SPAM SPAM SPAM | - @ 2a2b36e14660 (draft): animals + @ 3266db1117c9 (draft): animals | - o 682004e81e71 (draft): bathroom stuff + o 5486682f4225 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -1670,9 +1673,9 @@ In the mean time I noticed you can't buy animals in a super market and I prune the animal changeset: - $ hg prune 2a2b36e14660 + $ hg prune 3266db1117c9 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory is now at 682004e81e71 + working directory is now at 5486682f4225 1 changesets pruned 1 new orphan changesets @@ -1681,17 +1684,17 @@ is neither dead or obsolete. My repository is in an unstable state again. $ hg log -G - * fc41faf45288 (draft): SPAM SPAM SPAM + * fff8c3d068b6 (draft): SPAM SPAM SPAM | - x 2a2b36e14660 (draft): animals + x 3266db1117c9 (draft): animals | - @ 682004e81e71 (draft): bathroom stuff + @ 5486682f4225 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM | @@ -1805,7 +1808,7 @@ #endif $ hg log -r "orphan()" - fc41faf45288 (draft): SPAM SPAM SPAM + fff8c3d068b6 (draft): SPAM SPAM SPAM #if docgraph-ext $ hg docgraph -r "orphan()" --sphinx-directive --rankdir LR #rest-ignore @@ -1836,18 +1839,18 @@ move:[15] SPAM SPAM SPAM atop:[12] bathroom stuff merging shopping - working directory is now at e6cfcb672150 + working directory is now at c33e56ec23a8 $ hg log -G - @ e6cfcb672150 (draft): SPAM SPAM SPAM + @ c33e56ec23a8 (draft): SPAM SPAM SPAM | - o 682004e81e71 (draft): bathroom stuff + o 5486682f4225 (draft): bathroom stuff | - o 57e9caedbcb8 (public): SPAM SPAM + o 501b33037995 (public): SPAM SPAM | - o 41aff6a42b75 (public): adding fruit + o d300c8f961ce (public): adding fruit | - o dfd3a2d7691e (public): adding condiment + o 723e5a43d6d9 (public): adding condiment | o 9ca060c80d74 (public): SPAM |