tutorial: make it pass again
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 23 Apr 2012 17:25:36 +0200
changeset 209 7bee48a54c4a
parent 208 05d6e3e36980
child 210 168ea7d200a0
tutorial: make it pass again More work is needed but the tutorial work as a functionnal test.
docs/tutorials/tutorial.t
--- a/docs/tutorials/tutorial.t	Mon Apr 23 17:24:34 2012 +0200
+++ b/docs/tutorials/tutorial.t	Mon Apr 23 17:25:36 2012 +0200
@@ -19,48 +19,36 @@
 
 there is a local repository and a remote one.
 
-Please close your eyes.
+
+  $ cat >> $HGRCPATH << EOF
+  > [ui]
+  > logtemplate ="{node|short} ({phase}): {desc}\n"
+  > [diff]
+  > git = 1
+  > [alias]
+  > amend = amend -d '0 0'
+  > [extensions]
+  > hgext.graphlog=
+  > hgext.rebase=
+  > EOF
+  $ $(dirname $TESTDIR)/enable.sh >> $HGRCPATH 2> /dev/null
 
   $ hg init local
   $ cat >> local/.hg/hgrc << EOF
   > [paths]
   > remote = ../remote
   > [ui]
-  > user = Albert Beugras
-  > [diff]
-  > git = 1
-  > [alias]
-  > amend = amend -d '0 0'
-  > tlog = log --template "{node|short}: '{desc}'\n"
-  > ttlog = log --template "{node|short}: '{desc}' ({state})\n"
-  > tglog = log -G --template "{node|short}: '{desc}' {branches}\n"
-  > [extensions]
-  > hgext.graphlog=
-  > hgext.rebase=
+  > user = Babar the King
   > EOF
-  $ echo "states=$(echo $(dirname $TESTDIR))/hgext/states.py" >> local/.hg/hgrc
-  $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> local/.hg/hgrc
-  $ echo "evolution=$(echo $(dirname $TESTDIR))/hgext/evolution.py" >> local/.hg/hgrc
+
   $ hg init remote
   $ cat >> remote/.hg/hgrc << EOF
   > [paths]
   > local = ../local
   > [ui]
-  > user = René de Robert
-  > [diff]
-  > git = 1
-  > [alias]
-  > amend = amend -d '0 0'
-  > tlog = log --template "{node|short}: '{desc}' {branches}\n"
-  > ttlog = log --template "{node|short}: '{desc}' {state}\n"
-  > tglog = log -G --template "{node|short}: '{desc}' {branches}\n"
-  > [extensions]
-  > hgext.graphlog=
-  > hgext.rebase=
+  > user = Celestine the Queen
   > EOF
-  $ echo "states=$(echo $(dirname $TESTDIR))/hgext/states.py" >> remote/.hg/hgrc
-  $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> remote/.hg/hgrc
-  $ echo "evolution=$(echo $(dirname $TESTDIR))/hgext/evolution.py" >> remote/.hg/hgrc
+
   $ cd local
 
 You can reopen you eyes.
@@ -107,10 +95,10 @@
 
 I now have the following history:
 
-  $ hg tlog
-  d85de4546133: 'adding fruit'
-  4d5dc8187023: 'adding condiment'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  d85de4546133 (draft): adding fruit
+  4d5dc8187023 (draft): adding condiment
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 But, I just notice, I made a typo in Banana.
 
@@ -133,6 +121,13 @@
   +Pear
   +Apple
 
+The faulty changeset is in the "draft" phase because he was not exchanged with the outside. The first one have been exchanged and is an immutable public changeset
+
+  $ hg log
+  d85de4546133 (draft): adding fruit
+  4d5dc8187023 (draft): adding condiment
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
 hopefully. I can use hg amend to rewrite my faulty changeset!
 
   $ sed -i'' -e s/Bananos/Banana/ shopping
@@ -149,34 +144,13 @@
    Pear
    Apple
   $ hg amend
-  abort: can not rewrite immutable changeset d85de4546133
-  [255]
-
-By default all changeset are considered "published" and can't be rewrittent.
-
- $ hg ttlog
-
-You need to enable a mutable state in your repo the "ready" one
-
-  $ hg states ready --clever
-  $ hg ttlog
-  d85de4546133: 'adding fruit' (ready)
-  4d5dc8187023: 'adding condiment' (ready)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
-
-Notice that changeset you already shared with the outside have been keep
-published.
-
-The changeset we want to rewrite is now in a mutable state.
-
-  $ hg amend
 
 A new changeset with the right diff replace the wrong one.
 
-  $ hg tlog
-  0cacb48f4482: 'adding fruit'
-  4d5dc8187023: 'adding condiment'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  0cacb48f4482 (draft): adding fruit
+  4d5dc8187023 (draft): adding condiment
+  7e82d3f3c2cb (public): Monthy Python Shopping list
   $ hg export tip
   # HG changeset patch
   # User test
@@ -222,19 +196,19 @@
 
 I now have a new heads. Note that the remote head is immutable
 
-  $ hg ttlog
-  9ca060c80d74: 'SPAM' (published)
-  0cacb48f4482: 'adding fruit' (ready)
-  4d5dc8187023: 'adding condiment' (ready)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
-  $ hg tglog -r "::(9ca060c80d74 + 0cacb48f4482)"
-  o  9ca060c80d74: 'SPAM'
+  $ hg log
+  9ca060c80d74 (public): SPAM
+  0cacb48f4482 (draft): adding fruit
+  4d5dc8187023 (draft): adding condiment
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+  $ hg log -G
+  o  9ca060c80d74 (public): SPAM
   |
-  | @  0cacb48f4482: 'adding fruit'
+  | @  0cacb48f4482 (draft): adding fruit
   | |
-  | o  4d5dc8187023: 'adding condiment'
+  | o  4d5dc8187023 (draft): adding condiment
   |/
-  o  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  o  7e82d3f3c2cb (public): Monthy Python Shopping list
   
 
 instead of merging my head with the new one. I'm going to rebase my work
@@ -243,26 +217,23 @@
   $ hg rebase -d 9ca060c80d74 -s 4d5dc8187023
   merging shopping
   merging shopping
-  merging shopping
-  merging shopping
 
 
-My local work is now rebase on the remote one.
+My local work is now rebased on the remote one.
 
-  $ hg kill e7a71e229632 ad97bbd3e37d # XXX fix me instead
-  $ hg ttlog
-  387187ad9bd9: 'adding fruit' (ready)
-  dfd3a2d7691e: 'adding condiment' (ready)
-  9ca060c80d74: 'SPAM' (published)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
-  $ hg tglog -r '::.'
-  @  387187ad9bd9: 'adding fruit'
+  $ hg log
+  387187ad9bd9 (draft): adding fruit
+  dfd3a2d7691e (draft): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+  $ hg log -G
+  @  387187ad9bd9 (draft): adding fruit
   |
-  o  dfd3a2d7691e: 'adding condiment'
+  o  dfd3a2d7691e (draft): adding condiment
   |
-  o  9ca060c80d74: 'SPAM'
+  o  9ca060c80d74 (public): SPAM
   |
-  o  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  o  7e82d3f3c2cb (public): Monthy Python Shopping list
   
 
 Removing changeset
@@ -277,12 +248,12 @@
   > boat
   > EOF
   $ hg ci -m 'transport'
-  $ hg ttlog
-  d58c77aa15d7: 'transport' (ready)
-  387187ad9bd9: 'adding fruit' (ready)
-  dfd3a2d7691e: 'adding condiment' (ready)
-  9ca060c80d74: 'SPAM' (published)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
+  $ hg log
+  d58c77aa15d7 (draft): transport
+  387187ad9bd9 (draft): adding fruit
+  dfd3a2d7691e (draft): adding condiment
+  9ca060c80d74 (public): SPAM
+  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)
@@ -293,11 +264,11 @@
 
 The silly changeset is gone.
 
-  $ hg ttlog
-  387187ad9bd9: 'adding fruit' (ready)
-  dfd3a2d7691e: 'adding condiment' (ready)
-  9ca060c80d74: 'SPAM' (published)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
+  $ hg log
+  387187ad9bd9 (draft): adding fruit
+  dfd3a2d7691e (draft): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 Reordering changeset
 ------------------------
@@ -317,13 +288,13 @@
 
   $ sed -i'' -e 's/Spam/Spam Spam Spam/g' shopping
   $ hg ci -m 'SPAM SPAM'
-  $ hg ttlog
-  c48f32fb1787: 'SPAM SPAM' (ready)
-  8d39a843582d: 'bathroom stuff' (ready)
-  387187ad9bd9: 'adding fruit' (ready)
-  dfd3a2d7691e: 'adding condiment' (ready)
-  9ca060c80d74: 'SPAM' (published)
-  7e82d3f3c2cb: 'Monthy Python Shopping list' (published)
+  $ hg log
+  c48f32fb1787 (draft): SPAM SPAM
+  8d39a843582d (draft): bathroom stuff
+  387187ad9bd9 (draft): adding fruit
+  dfd3a2d7691e (draft): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 .. note: don't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are
 immutable.
@@ -332,22 +303,25 @@
 
 To be able to push "SPAM SPAM" I need a version of "SPAM SPAM" not children of "bathroom stuff"
 
-You can use rebase or relocate for that:
+You can use 'rebase -r' or 'graft -O' for that:
 
-  $ hg relocate 'p1(8d39a843582d)' --traceback
+  $ hg up 'p1(8d39a843582d)' # going on "bathroom stuff" parent
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg graft -O c48f32fb1787 # moving "SPAM SPAM" to the working directory parent
+  grafting revision 10
   merging shopping
-  $ hg tglog -r '::(. + 8d39a843582d)'
-  @  02e33960e937: 'SPAM SPAM'
+  $ hg log -G
+  @  a2fccc2e7b08 (draft): SPAM SPAM
   |
-  | o  8d39a843582d: 'bathroom stuff'
+  | o  8d39a843582d (draft): bathroom stuff
   |/
-  o  387187ad9bd9: 'adding fruit'
+  o  387187ad9bd9 (draft): adding fruit
   |
-  o  dfd3a2d7691e: 'adding condiment'
+  o  dfd3a2d7691e (draft): adding condiment
   |
-  o  9ca060c80d74: 'SPAM'
+  o  9ca060c80d74 (public): SPAM
   |
-  o  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  o  7e82d3f3c2cb (public): Monthy Python Shopping list
   
 
 We have a new SPAM SPAM version without the bathroom stuff
@@ -360,7 +334,7 @@
   # HG changeset patch
   # User test
   # Date 0 0
-  # Node ID 02e33960e937ad1bd59241ebdafd7a2494240ddf
+  # Node ID a2fccc2e7b08bbce6af7255b989453f7089e4cf0
   # Parent  387187ad9bd9d8f9a00a9fa804a26231db547429
   SPAM SPAM
   
@@ -374,9 +348,14 @@
    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.
+
+  $ hg phase --force --secret 8d39a843582d
+
 we can now push our change:
 
-  $ hg push -r . remote
+  $ hg push remote
   pushing to $TESTTMP/remote
   searching for changes
   adding changesets
@@ -384,10 +363,11 @@
   adding file changes
   added 3 changesets with 3 changes to 1 files
 
-for simplicity shake we relocate the bathroom changeset
+for simplicity shake we get the bathroom change in line again
 
-  $ hg relocate -r 8d39a843582d 02e33960e937
+  $ hg rebase -Dr 8d39a843582d -d a2fccc2e7b08
   merging shopping
+  $ hg phase --draft .
 
 
 Splitting change
@@ -407,79 +387,78 @@
 sharing mutable changeset
 ----------------------------
 
-To share mutable changeset with other just check that both have the "ready"
-state activated. Otherwise you will get the previously observe behavior where
-exchanged changeset are automatically published.
+To share mutable changeset with other just check that the repo you interact
+with is "not publishing". Otherwise you will get the previously observe
+behavior where exchanged changeset are automatically published.
 
   $ cd ../remote
-  $ hg states 
-  published
+  $ hg -R ../local/ showconfig phases
 
-The remote repository have only the immutable "published" state activated. Any
-changeset echanged from "local" to "remote" will be set in the publised state:
+the localrepo does not have any specific configuration for `phases.publish`. It is ``true`` by default.
 
-  $ hg -R ../local push -f remote # XXX we should pull but the support is awful
-  pushing to $TESTTMP/remote
+  $ hg pull local
+  pulling from $TESTTMP/local
   searching for changes
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  $ hg ttlog
-  a3515e5d0332: 'bathroom stuff' published
-  02e33960e937: 'SPAM SPAM' published
-  387187ad9bd9: 'adding fruit' published
-  dfd3a2d7691e: 'adding condiment' published
-  9ca060c80d74: 'SPAM' published
-  7e82d3f3c2cb: 'Monthy Python Shopping list' published
+  (run 'hg update' to get a working copy)
+  $ hg log
+  8a79ae8b029e (public): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 
 
 We do not want to publish the "bathroom changeset". Let's rollback the last transaction
 
   $ hg rollback
-  repository tip rolled back to revision 4 (undo push)
-  working directory now based on revision 1
-  $ hg ttlog
-  02e33960e937: 'SPAM SPAM' published
-  387187ad9bd9: 'adding fruit' published
-  dfd3a2d7691e: 'adding condiment' published
-  9ca060c80d74: 'SPAM' published
-  7e82d3f3c2cb: 'Monthy Python Shopping list' published
-  $ rm ../local/.hg/states/published-heads     # XXX USE --exact
-  $ hg -R ../local publish 02e33960e937 # XXX FIX THE BUG
+  repository tip rolled back to revision 4 (undo pull)
+  $ hg log
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
+Let's make thz local repo "non publishing"
 
-To enable the mutable "ready" state in a repository, use the states command.
+  $ echo "[phases]\npublish=false" >> ../local/.hg/hgrc
+  $ echo "[phases]\npublish=false" >> .hg/hgrc
+  $ hg showconfig phases
+  phases.publish=false
+  $ hg -R ../local/ showconfig phases
+  phases.publish=false
 
-  $ hg states ready
-  $ hg states 
-  published
-  ready
 
-I can nom exchange mutable changeset between "remote" and "local" repository.
+I can now exchange mutable changeset between "remote" and "local" repository.
 
-  $ hg pull local # XXX We pull too much stuff
+  $ hg pull local
   pulling from $TESTTMP/local
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 10 changesets with 10 changes to 1 files (+5 heads)
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  $ hg ttlog
-  a3515e5d0332: 'bathroom stuff' ready
-  02e33960e937: 'SPAM SPAM' published
-  387187ad9bd9: 'adding fruit' published
-  dfd3a2d7691e: 'adding condiment' published
-  9ca060c80d74: 'SPAM' published
-  7e82d3f3c2cb: 'Monthy Python Shopping list' published
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg log
+  8a79ae8b029e (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
-Rebasing out-of-sync change after update
+Rebasing unstable change after update
 ----------------------------------------------
 
 Remotely someone add a new changeset on top of our mutable "bathroom" on.
 
-  $ hg up a3515e5d0332 -q
+  $ hg up 8a79ae8b029e -q
   $ cat >> shopping << EOF
   > Giraffe
   > Rhino
@@ -488,19 +467,19 @@
   > EOF
   $ hg ci -m 'animals' -q # XXX remove the -q
 
-While this time locally, we rebase the updated the "bathroom changeset"
+While this time locally, we updated "bathroom changeset"
 
   $ cd ../local
-  $ hg up a3515e5d0332 -q
+  $ hg up 8a79ae8b029e -q
   $ sed -i'' -e 's/... More bathroom stuff to come/Bath Robe/' shopping
   $ hg amend
-  $ hg tlog
-  962d3a7d27ad: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  ffa278c50818 (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 
 When we pull from remote again we get an unstable state!
@@ -513,62 +492,73 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
   (run 'hg heads .' to see heads, 'hg merge' to merge)
-  $ hg tlog
-  0b061760b677: 'animals'
-  962d3a7d27ad: 'bathroom stuff'
-  a3515e5d0332: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  9ac5d0e790a2 (secret): animals
+  ffa278c50818 (draft): bathroom stuff
+  8a79ae8b029e (secret): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
+# XXX Changeset have turned secret because of current implementation of mutable.
 
 The new changeset "animal" is based one an old changeset of "bathroom". You can
 see both version showing up the log.
 
-  $ hg tglog -r '::(962d3a7d27ad + 0b061760b677)'
-  o  0b061760b677: 'animals'
+  $ hg glog
+  o  9ac5d0e790a2 (secret): animals
   |
-  | @  962d3a7d27ad: 'bathroom stuff'
+  | @  ffa278c50818 (draft): bathroom stuff
   | |
-  o |  a3515e5d0332: 'bathroom stuff'
+  o |  8a79ae8b029e (secret): bathroom stuff
   |/
-  o  02e33960e937: 'SPAM SPAM'
+  o  a2fccc2e7b08 (public): SPAM SPAM
   |
-  o  387187ad9bd9: 'adding fruit'
+  o  387187ad9bd9 (public): adding fruit
   |
-  o  dfd3a2d7691e: 'adding condiment'
+  o  dfd3a2d7691e (public): adding condiment
   |
-  o  9ca060c80d74: 'SPAM'
+  o  9ca060c80d74 (public): SPAM
   |
-  o  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  o  7e82d3f3c2cb (public): Monthy Python Shopping list
   
 
-In hgviewn there is a nice doted relation highlighting 962d3a7d27ad  is a new
-version of a3515e5d0332. this is not yet ported to graphlog.
+In hgview there is a nice doted relation highlighting ffa278c50818  is a new
+version of 8a79ae8b029e. this is not yet ported to graphlog.
 
-To resolve this unstable state, you need to relocate 0b061760b677 onto
-962d3a7d27ad the "hg evolve" will make the thinking for you and suggest it to
-you.
+To resolve this unstable state, you need to rebase 9ac5d0e790a2 onto
+ffa278c50818 the "hg stabilize" command will make this for you. It has a
+--dry-run option to only suggest the next move
 
-  $ hg evolve
-  hg relocate --rev 0b061760b677 962d3a7d27ad
+  $ hg stabilize --dry-run
+  move:[15] animals
+  atop:[14] bathroom stuff
+  hg rebase -Dr 9ac5d0e790a2 -d ffa278c50818
+
 
 Let's do it
 
-  $ hg relocate --rev 0b061760b677 962d3a7d27ad
+  $ hg rebase -Dr 9ac5d0e790a2 -d ffa278c50818
   merging shopping
 
-The old vesion of bathroom is hidden again now.
+The old version of bathroom is hidden again now.
 
-  $ hg tlog
-  39a85a192689: 'animals'
-  962d3a7d27ad: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  437efbcaf700 (secret): animals
+  ffa278c50818 (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
+XXX remove me when fixed
+restore a proper phase for animals
+
+  $ hg ph -dv 437efbcaf700
+  phase changed for 1 changesets
 
 We can push this evolution to remote
 
@@ -587,10 +577,10 @@
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   Working directory parent is obsolete
 
-  $ hg up 39a85a192689
+  $ hg up 437efbcaf700
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-Relocating out-of-sync change after kill
+Relocating unstable change after kill
 ----------------------------------------------
 
 The remote guy keep working
@@ -609,66 +599,73 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
   (run 'hg update' to get a working copy)
-  $ hg tlog
-  e768beeb835c: 'SPAM SPAM SPAM'
-  39a85a192689: 'animals'
-  962d3a7d27ad: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  ae45c0c3092a (draft): SPAM SPAM SPAM
+  437efbcaf700 (draft): animals
+  ffa278c50818 (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
 
 In the mean time I noticed you can't buy animals in a super market and I kill the animal changeset:
 
-  $ hg kill 39a85a192689 # issue warning here
+  $ hg kill 437efbcaf700 # XXX issue a warning here
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory now at 962d3a7d27ad
+  working directory now at ffa278c50818
+
 
 The animals changeset is still displayed because the "SPAM SPAM SPAM" changeset
 is neither dead or obsolete.  My repository is in an unstable state again.
 
-  $ hg tlog 
-  e768beeb835c: 'SPAM SPAM SPAM'
-  39a85a192689: 'animals'
-  962d3a7d27ad: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
-  $ hg tglog  -r '::e768beeb835c'
-  o  e768beeb835c: 'SPAM SPAM SPAM'
+  $ hg log
+  ae45c0c3092a (secret): SPAM SPAM SPAM
+  437efbcaf700 (secret): animals
+  ffa278c50818 (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
+  $ hg log -r 'unstable()'
+  ae45c0c3092a (secret): SPAM SPAM SPAM
+
+  $ hg log -G
+  o  ae45c0c3092a (secret): SPAM SPAM SPAM
   |
-  o  39a85a192689: 'animals'
-  |
-  @  962d3a7d27ad: 'bathroom stuff'
+  o  437efbcaf700 (secret): animals
   |
-  o  02e33960e937: 'SPAM SPAM'
+  @  ffa278c50818 (draft): bathroom stuff
   |
-  o  387187ad9bd9: 'adding fruit'
+  o  a2fccc2e7b08 (public): SPAM SPAM
   |
-  o  dfd3a2d7691e: 'adding condiment'
+  o  387187ad9bd9 (public): adding fruit
   |
-  o  9ca060c80d74: 'SPAM'
+  o  dfd3a2d7691e (public): adding condiment
   |
-  o  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  o  9ca060c80d74 (public): SPAM
+  |
+  o  7e82d3f3c2cb (public): Monthy Python Shopping list
   
+# XXX make this work
+#  $ hg stabilize --any
+#  merging shopping
 
-#  $ hg evolve # XXX not ready yet
-#  hg relocate --rev  e768beeb835c 962d3a7d27ad
-
-  $ hg relocate -r  e768beeb835c 'p1(39a85a192689)'
+  $ hg graft -O ae45c0c3092a
+  grafting revision 17
   merging shopping
 
-  $ hg tlog 
-  19098f8178f3: 'SPAM SPAM SPAM'
-  962d3a7d27ad: 'bathroom stuff'
-  02e33960e937: 'SPAM SPAM'
-  387187ad9bd9: 'adding fruit'
-  dfd3a2d7691e: 'adding condiment'
-  9ca060c80d74: 'SPAM'
-  7e82d3f3c2cb: 'Monthy Python Shopping list'
+  $ hg log
+  20de1fb1cec5 (draft): SPAM SPAM SPAM
+  ffa278c50818 (draft): bathroom stuff
+  a2fccc2e7b08 (public): SPAM SPAM
+  387187ad9bd9 (public): adding fruit
+  dfd3a2d7691e (public): adding condiment
+  9ca060c80d74 (public): SPAM
+  7e82d3f3c2cb (public): Monthy Python Shopping list
+
 
 Handling Conflicting amend
 ----------------------------------------------