Mercurial > evolve
diff tests/test-tutorial.t @ 640:629ec7f612aa stable
tutorial: second replacement of hg amend by commit --amend
(the diff is huge because commit --amend have protection vs cycle)
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 02 Jan 2013 14:01:24 +0100 |
parents | bc2527223350 |
children | 5a929510de9d |
line wrap: on
line diff
--- a/tests/test-tutorial.t Wed Jan 02 13:48:48 2013 +0100 +++ b/tests/test-tutorial.t Wed Jan 02 14:01:24 2013 +0100 @@ -170,12 +170,12 @@ +Banana Pear Apple - $ hg amend + $ hg commit --amend A new changeset with the right diff replace the wrong one. $ hg log -G - @ 0cacb48f4482 (draft): adding fruit + @ 9d0363b81950 (draft): adding fruit | o 4d5dc8187023 (draft): adding condiment | @@ -185,7 +185,7 @@ # HG changeset patch # User test # Date 0 0 - # Node ID 0cacb48f44828d2fd31c4e45e18fde32a5b2f07b + # Node ID 9d0363b81950646bc6ad1ec5de8b8197ea586541 # Parent 4d5dc81870237d492284826e21840b2ca00e26d1 adding fruit @@ -227,7 +227,7 @@ $ hg log -G o 9ca060c80d74 (public): SPAM | - | @ 0cacb48f4482 (draft): adding fruit + | @ 9d0363b81950 (draft): adding fruit | | | o 4d5dc8187023 (draft): adding condiment |/ @@ -245,7 +245,7 @@ My local work is now rebased on the remote one. $ hg log -G - @ 387187ad9bd9 (draft): adding fruit + @ 41aff6a42b75 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | @@ -267,9 +267,9 @@ > EOF $ hg ci -m 'transport' $ hg log -G - @ d58c77aa15d7 (draft): transport + @ 1125e39fbf21 (draft): transport | - o 387187ad9bd9 (draft): adding fruit + o 41aff6a42b75 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | @@ -283,12 +283,12 @@ $ hg prune . # . is for working directory parent 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory now at 387187ad9bd9 + working directory now at 41aff6a42b75 The silly changeset is gone. $ hg log -G - @ 387187ad9bd9 (draft): adding fruit + @ 41aff6a42b75 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | @@ -316,11 +316,11 @@ $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping $ hg ci -m 'SPAM SPAM' $ hg log -G - @ c48f32fb1787 (draft): SPAM SPAM + @ fac207dec9f5 (draft): SPAM SPAM | - o 8d39a843582d (draft): bathroom stuff + o 10b8aeaa8cc8 (draft): bathroom stuff | - o 387187ad9bd9 (draft): adding fruit + o 41aff6a42b75 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | @@ -337,16 +337,16 @@ You can use 'rebase -r' or 'graft -O' for that: - $ hg up 'p1(8d39a843582d)' # going on "bathroom stuff" parent + $ hg up 'p1(10b8aeaa8cc8)' # going on "bathroom stuff" parent 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg rebase --rev c48f32fb1787 --dest . # moving "SPAM SPAM" to the working directory parent + $ hg rebase --rev fac207dec9f5 --dest . # moving "SPAM SPAM" to the working directory parent merging shopping $ hg log -G - @ 02e33960e937 (draft): SPAM SPAM + @ a224f2a4fb9f (draft): SPAM SPAM | - | o 8d39a843582d (draft): bathroom stuff + | o 10b8aeaa8cc8 (draft): bathroom stuff |/ - o 387187ad9bd9 (draft): adding fruit + o 41aff6a42b75 (draft): adding fruit | o dfd3a2d7691e (draft): adding condiment | @@ -365,8 +365,8 @@ # HG changeset patch # User test # Date 0 0 - # Node ID 02e33960e937ad1bd59241ebdafd7a2494240ddf - # Parent 387187ad9bd9d8f9a00a9fa804a26231db547429 + # Node ID a224f2a4fb9f9f828f608959912229d7b38b26de + # Parent 41aff6a42b7578ec7ec3cb2041633f1ca43cca96 SPAM SPAM diff --git a/shopping b/shopping @@ -382,7 +382,7 @@ To make sure I do not push unready changeset by mistake I set the "bathroom stuff" changeset in the secret phase. - $ hg phase --force --secret 8d39a843582d + $ hg phase --force --secret 10b8aeaa8cc8 we can now push our change: @@ -396,15 +396,15 @@ for simplicity shake we get the bathroom change in line again - $ hg rebase -r 8d39a843582d -d 02e33960e937 + $ hg rebase -r 10b8aeaa8cc8 -d a224f2a4fb9f merging shopping $ hg phase --draft . $ hg log -G - @ a3515e5d0332 (draft): bathroom stuff + @ 75954b8cd933 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -456,11 +456,11 @@ added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) $ hg log -G - o a3515e5d0332 (public): bathroom stuff + o 75954b8cd933 (public): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -476,9 +476,9 @@ $ hg rollback repository tip rolled back to revision 4 (undo pull) $ hg log -G - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -510,11 +510,11 @@ added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) $ hg log -G - o a3515e5d0332 (draft): bathroom stuff + o 75954b8cd933 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -528,7 +528,7 @@ Remotely someone add a new changeset on top of the mutable "bathroom" on. - $ hg up a3515e5d0332 -q + $ hg up 75954b8cd933 -q $ cat >> shopping << EOF > Giraffe > Rhino @@ -540,15 +540,15 @@ But at the same time, locally, this same "bathroom changeset" was updated. $ cd ../local - $ hg up a3515e5d0332 -q + $ hg up 75954b8cd933 -q $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping $ hg commit --amend $ hg log -G - @ 36b5ba414186 (draft): bathroom stuff + @ a44c85f957d3 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -576,15 +576,15 @@ see both version showing up in the log. $ hg log -G - o 0b061760b677 (draft): animals + o bf1b0d202029 (draft): animals | - | @ 36b5ba414186 (draft): bathroom stuff + | @ a44c85f957d3 (draft): bathroom stuff | | - x | a3515e5d0332 (draft): bathroom stuff + x | 75954b8cd933 (draft): bathroom stuff |/ - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -593,10 +593,10 @@ o 7e82d3f3c2cb (public): Monthy Python Shopping list -The older version a3515e5d0332 never ceased to exist in the local repo. It was +The older version 75954b8cd933 never ceased to exist in the local repo. It was jsut hidden and excluded from pull and push. -.. note:: In hgview there is a nice doted relation highlighting 36b5ba414186 as a new version of a3515e5d0332. this is not yet ported to graphlog. +.. note:: In hgview there is a nice doted relation highlighting a44c85f957d3 as a new version of 75954b8cd933. this is not yet ported to graphlog. Their is **unstable** changeset in this history now. Mercurial will refuse to share it with the outside: @@ -604,22 +604,22 @@ $ hg push other pushing to $TESTTMP/other searching for changes - abort: push includes unstable changeset: 0b061760b677! + abort: push includes unstable changeset: bf1b0d202029! (use 'hg evolve' to get a stable history or --force to ignore warnings) [255] -To resolve this unstable state, you need to rebase 0b061760b677 onto -36b5ba414186 the "hg evolve" command will make this for you. +To resolve this unstable state, you need to rebase bf1b0d202029 onto +a44c85f957d3 the "hg evolve" command will make this for you. It has a --dry-run option to only suggest the next move. $ hg evolve --dry-run move:[15] animals atop:[14] bathroom stuff - hg rebase -r 0b061760b677 -d 36b5ba414186 + hg rebase -r bf1b0d202029 -d a44c85f957d3 Let's do it @@ -631,13 +631,13 @@ The old version of bathroom is hidden again. $ hg log -G - @ fd0d2651e61c (draft): animals + @ ee942144f952 (draft): animals | - o 36b5ba414186 (draft): bathroom stuff + o a44c85f957d3 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -666,7 +666,7 @@ no changes found Working directory parent is obsolete - $ hg up fd0d2651e61c + $ hg up ee942144f952 1 files updated, 0 files merged, 0 files removed, 0 files unresolved Relocating unstable change after prune @@ -689,15 +689,15 @@ added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) $ hg log -G - o 56c68f64a3a0 (draft): SPAM SPAM SPAM + o 99f039c5ec9e (draft): SPAM SPAM SPAM | - @ fd0d2651e61c (draft): animals + @ ee942144f952 (draft): animals | - o 36b5ba414186 (draft): bathroom stuff + o a44c85f957d3 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -708,9 +708,9 @@ In the mean time I noticed you can't buy animals in a super market and I prune the animal changeset: - $ hg prune fd0d2651e61c + $ hg prune ee942144f952 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - working directory now at 36b5ba414186 + working directory now at a44c85f957d3 1 new unstable changesets @@ -718,15 +718,15 @@ is neither dead or obsolete. My repository is in an unstable state again. $ hg log -G - o 56c68f64a3a0 (draft): SPAM SPAM SPAM + o 99f039c5ec9e (draft): SPAM SPAM SPAM | - x fd0d2651e61c (draft): animals + x ee942144f952 (draft): animals | - @ 36b5ba414186 (draft): bathroom stuff + @ a44c85f957d3 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment | @@ -736,7 +736,7 @@ $ hg log -r 'unstable()' - 56c68f64a3a0 (draft): SPAM SPAM SPAM + 99f039c5ec9e (draft): SPAM SPAM SPAM $ hg evolve move:[17] SPAM SPAM SPAM @@ -744,13 +744,13 @@ merging shopping $ hg log -G - @ 6dd8ca9dbcdc (draft): SPAM SPAM SPAM + @ 40aa40daeefb (draft): SPAM SPAM SPAM | - o 36b5ba414186 (draft): bathroom stuff + o a44c85f957d3 (draft): bathroom stuff | - o 02e33960e937 (public): SPAM SPAM + o a224f2a4fb9f (public): SPAM SPAM | - o 387187ad9bd9 (public): adding fruit + o 41aff6a42b75 (public): adding fruit | o dfd3a2d7691e (public): adding condiment |