test-compat: merge with mercurial-4.0 branch mercurial-3.9
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 22 May 2017 15:42:13 +0200
branchmercurial-3.9
changeset 2468 8fadd87da07e
parent 2467 d517659556cf (current diff)
parent 2433 fd24f1c7accd (diff)
child 2469 bc109ed44045
child 2533 7abea6ea172c
test-compat: merge with mercurial-4.0 branch
tests/test-check-setup-manifest.t
tests/test-discovery-obshashrange.t
tests/test-evolve-obshistory.t
tests/test-evolve-topic.t
tests/test-prev-next.t
tests/test-topic-dest.t
tests/test-topic-push.t
tests/test-topic-stack-data.t
tests/test-topic-stack.t
tests/test-topic-tutorial.t
tests/test-topic.t
--- a/tests/test-check-setup-manifest.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#require test-repo
-
-  $ checkcm() {
-  >   if ! (which check-manifest > /dev/null); then
-  >     echo skipped: missing tool: check-manifest;
-  >     exit 80;
-  >   fi;
-  > };
-  $ checkcm
-  $ cat << EOF >> $HGRCPATH
-  > [experimental]
-  > evolution=all
-  > EOF
-
-Run check manifest:
-
-  $ cd $TESTDIR/..
-  $ check-manifest
-  lists of files in version control and sdist match
--- a/tests/test-discovery-obshashrange.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-discovery-obshashrange.t	Mon May 22 15:42:13 2017 +0200
@@ -90,35 +90,29 @@
   * @0000000000000000000000000000000000000000 (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
   * @0000000000000000000000000000000000000000 (*)> log -G exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 66f7d451a68b85ed82ff5fcc254daf50c74144bd (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 66f7d451a68b85ed82ff5fcc254daf50c74144bd exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 01241442b3c2bf3211e593b549c655ea65b295e3 (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 01241442b3c2bf3211e593b549c655ea65b295e3 exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete cccccccccccccccccccccccccccccccccccccccc bebd167eb94d257ace0e814aeb98e6972ed2970d (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete cccccccccccccccccccccccccccccccccccccccc bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 --config experimental.obshashrange.warm-cache=0 exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 4de32a90b66cd083ebf3c00b41277aa7abca51dd (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 2o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 4de32a90b66cd083ebf3c00b41277aa7abca51dd exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> blackbox (glob)
   $ rm .hg/blackbox.log
@@ -305,7 +299,6 @@
   ffffffffffffffffffffffffffffffffffffffff 45f8b879de922f6a6e620ba04205730335b6fc7e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   $ hg blackbox
   * @0000000000000000000000000000000000000000 (*)> debugobsolete (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> up (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> up exited 0 after *.?? seconds (glob)
@@ -318,7 +311,6 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> commit -m foo exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete ffffffffffffffffffffffffffffffffffffffff 45f8b879de922f6a6e620ba04205730335b6fc7e (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
@@ -331,13 +323,11 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 111111111111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 111111111111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 22222222222222222bbbbbbbbbbbbb2222222222 2dc09a01254db841290af0538aa52f6f52c776e3 (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
@@ -387,17 +377,14 @@
 
   $ hg -R ../server blackbox
   * @0000000000000000000000000000000000000000 (*)> debugobsolete --rev ::tip (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
   * @0000000000000000000000000000000000000000 (*)> -R ../server/ debugobsolete --rev ::tip exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaa11111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> -R ../server debugobsolete aaaaaaa11111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugobsolete bbbbbbb2222222222bbbbbbbbbbbbb2222222222 bebd167eb94d257ace0e814aeb98e6972ed2970d (glob)
-  * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
@@ -417,7 +404,6 @@
   dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   $ hg blackbox
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob)
@@ -496,7 +482,6 @@
              1 66f7d451a68b            1            1            2 327c7dd73d29
   $ hg blackbox
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete --rev ::6 (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete --rev ::6 exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev heads(all()) (glob)
--- a/tests/test-evolve-obshistory.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1561 +0,0 @@
-This test file test the various messages when accessing obsolete
-revisions.
-
-Global setup
-============
-
-  $ . $TESTDIR/testlib/common.sh
-  $ cat >> $HGRCPATH <<EOF
-  > [ui]
-  > interactive = true
-  > [phases]
-  > publish=False
-  > [extensions]
-  > evolve =
-  > color =
-  > EOF
-
-Test output on amended commit
-=============================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-amend
-  $ cd $TESTTMP/local-amend
-  $ mkcommit ROOT
-  $ mkcommit A0
-  $ echo 42 >> A0
-  $ hg amend -m "A1
-  > 
-  > Better commit message"
-  $ hg log --hidden -G
-  @  changeset:   3:4ae3a4151de9
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A1
-  |
-  | x  changeset:   2:f137d23bb3e1
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     temporary amend commit for 471f378eab4c
-  | |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-  $ hg olog 4ae3a4151de9
-  @  4ae3a4151de9 (3) A1
-  |
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 4ae3a4151de9 (glob)
-  
-  $ hg olog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "4ae3a4151de9",
-          "debugobshistory.rev": 3,
-          "debugobshistory.shortdescription": "A1"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "4ae3a4151de9"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-  $ hg olog --hidden 471f378eab4c
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 4ae3a4151de9 (glob)
-  
-  $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "4ae3a4151de9"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-  $ hg update 471f378eab4c
-  abort: hidden revision '471f378eab4c'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden "desc(A0)"
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: 4ae3a4151de9)
-
-Test output with pruned commit
-==============================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-prune
-  $ cd $TESTTMP/local-prune
-  $ mkcommit ROOT
-  $ mkcommit A0 # 0
-  $ mkcommit B0 # 1
-  $ hg log --hidden -G
-  @  changeset:   2:0dec01379d3b
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B0
-  |
-  o  changeset:   1:471f378eab4c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg prune -r 'desc(B0)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  working directory now at 471f378eab4c
-  1 changesets pruned
-  $ hg log --hidden -G
-  x  changeset:   2:0dec01379d3b
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B0
-  |
-  @  changeset:   1:471f378eab4c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-
-Actual test
------------
-
-  $ hg olog 'desc(B0)' --hidden
-  x  0dec01379d3b (2) B0
-       pruned by test (*20*) (glob)
-  
-  $ hg olog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.verb": "pruned"
-              }
-          ],
-          "debugobshistory.node": "0dec01379d3b",
-          "debugobshistory.rev": 2,
-          "debugobshistory.shortdescription": "B0"
-      }
-  ]
-  $ hg olog 'desc(A0)'
-  @  471f378eab4c (1) A0
-  
-  $ hg olog 'desc(A0)' --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-  $ hg up 1
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg up 0dec01379d3b
-  abort: hidden revision '0dec01379d3b'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg up --hidden -r 'desc(B0)'
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its parent successor)
-
-Test output with splitted commit
-================================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-split
-  $ cd $TESTTMP/local-split
-  $ mkcommit ROOT
-  $ echo 42 >> a
-  $ echo 43 >> b
-  $ hg commit -A -m "A0"
-  adding a
-  adding b
-  $ hg log --hidden -G
-  @  changeset:   1:471597cad322
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg split -r 'desc(A0)' -d "0 0" << EOF
-  > y
-  > y
-  > n
-  > n
-  > y
-  > y
-  > EOF
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  adding a
-  adding b
-  diff --git a/a b/a
-  new file mode 100644
-  examine changes to 'a'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +42
-  record change 1/2 to 'a'? [Ynesfdaq?] y
-  
-  diff --git a/b b/b
-  new file mode 100644
-  examine changes to 'b'? [Ynesfdaq?] n
-  
-  created new head
-  Done splitting? [yN] n
-  diff --git a/b b/b
-  new file mode 100644
-  examine changes to 'b'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +43
-  record this change to 'b'? [Ynesfdaq?] y
-  
-  no more change to split
-
-  $ hg log --hidden -G
-  @  changeset:   3:f257fde29c7a
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   2:337fec4d2edc
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  | x  changeset:   1:471597cad322
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-
-Check that debugobshistory on splitted commit show both targets
-  $ hg olog 471597cad322 --hidden
-  x  471597cad322 (1) A0
-       rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
-  
-  $ hg olog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "337fec4d2edc",
-                      "f257fde29c7a"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471597cad322",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-Check that debugobshistory on the first successor after split show
-the revision plus the splitted one
-  $ hg olog 337fec4d2edc
-  o  337fec4d2edc (2) A0
-  |
-  x  471597cad322 (1) A0
-       rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
-  
-Check that debugobshistory on the second successor after split show
-the revision plus the splitted one
-  $ hg olog f257fde29c7a
-  @  f257fde29c7a (3) A0
-  |
-  x  471597cad322 (1) A0
-       rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
-  
-Check that debugobshistory on both successors after split show
-a coherent graph
-  $ hg olog 'f257fde29c7a+337fec4d2edc'
-  o  337fec4d2edc (2) A0
-  |
-  | @  f257fde29c7a (3) A0
-  |/
-  x  471597cad322 (1) A0
-       rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
-  
-  $ hg update 471597cad322
-  abort: hidden revision '471597cad322'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'min(desc(A0))'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (471597cad322)
-  (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
-
-Test output with lots of splitted commit
-========================================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-lots-split
-  $ cd $TESTTMP/local-lots-split
-  $ mkcommit ROOT
-  $ echo 42 >> a
-  $ echo 43 >> b
-  $ echo 44 >> c
-  $ echo 45 >> d
-  $ hg commit -A -m "A0"
-  adding a
-  adding b
-  adding c
-  adding d
-  $ hg log --hidden -G
-  @  changeset:   1:de7290d8b885
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-
-  $ hg split -r 'desc(A0)' -d "0 0" << EOF
-  > y
-  > y
-  > n
-  > n
-  > n
-  > n
-  > y
-  > y
-  > n
-  > n
-  > n
-  > y
-  > y
-  > n
-  > n
-  > y
-  > y
-  > EOF
-  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  adding a
-  adding b
-  adding c
-  adding d
-  diff --git a/a b/a
-  new file mode 100644
-  examine changes to 'a'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +42
-  record change 1/4 to 'a'? [Ynesfdaq?] y
-  
-  diff --git a/b b/b
-  new file mode 100644
-  examine changes to 'b'? [Ynesfdaq?] n
-  
-  diff --git a/c b/c
-  new file mode 100644
-  examine changes to 'c'? [Ynesfdaq?] n
-  
-  diff --git a/d b/d
-  new file mode 100644
-  examine changes to 'd'? [Ynesfdaq?] n
-  
-  created new head
-  Done splitting? [yN] n
-  diff --git a/b b/b
-  new file mode 100644
-  examine changes to 'b'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +43
-  record change 1/3 to 'b'? [Ynesfdaq?] y
-  
-  diff --git a/c b/c
-  new file mode 100644
-  examine changes to 'c'? [Ynesfdaq?] n
-  
-  diff --git a/d b/d
-  new file mode 100644
-  examine changes to 'd'? [Ynesfdaq?] n
-  
-  Done splitting? [yN] n
-  diff --git a/c b/c
-  new file mode 100644
-  examine changes to 'c'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +44
-  record change 1/2 to 'c'? [Ynesfdaq?] y
-  
-  diff --git a/d b/d
-  new file mode 100644
-  examine changes to 'd'? [Ynesfdaq?] n
-  
-  Done splitting? [yN] n
-  diff --git a/d b/d
-  new file mode 100644
-  examine changes to 'd'? [Ynesfdaq?] y
-  
-  @@ -0,0 +1,1 @@
-  +45
-  record this change to 'd'? [Ynesfdaq?] y
-  
-  no more change to split
-
-  $ hg log --hidden -G
-  @  changeset:   5:c7f044602e9b
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   4:1ae8bc733a14
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   3:f257fde29c7a
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   2:337fec4d2edc
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  | x  changeset:   1:de7290d8b885
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-
-  $ hg olog de7290d8b885 --hidden
-  x  de7290d8b885 (1) A0
-       rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
-  
-  $ hg olog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "1ae8bc733a14",
-                      "337fec4d2edc",
-                      "c7f044602e9b",
-                      "f257fde29c7a"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "de7290d8b885",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-  $ hg olog c7f044602e9b
-  @  c7f044602e9b (5) A0
-  |
-  x  de7290d8b885 (1) A0
-       rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
-  
-  $ hg olog c7f044602e9b --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "c7f044602e9b",
-          "debugobshistory.rev": 5,
-          "debugobshistory.shortdescription": "A0"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "1ae8bc733a14",
-                      "337fec4d2edc",
-                      "c7f044602e9b",
-                      "f257fde29c7a"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "de7290d8b885",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-Check that debugobshistory on all heads show a coherent graph
-  $ hg olog 2::5
-  o  1ae8bc733a14 (4) A0
-  |
-  | o  337fec4d2edc (2) A0
-  |/
-  | @  c7f044602e9b (5) A0
-  |/
-  | o  f257fde29c7a (3) A0
-  |/
-  x  de7290d8b885 (1) A0
-       rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
-  
-  $ hg update de7290d8b885
-  abort: hidden revision 'de7290d8b885'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'min(desc(A0))'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (de7290d8b885)
-  (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more)
-
-Test output with folded commit
-==============================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-fold
-  $ cd $TESTTMP/local-fold
-  $ mkcommit ROOT
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg log --hidden -G
-  @  changeset:   2:0dec01379d3b
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B0
-  |
-  o  changeset:   1:471f378eab4c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg fold --exact -r 'desc(A0) + desc(B0)' --date "0 0" -m "C0"
-  2 changesets folded
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log --hidden -G
-  @  changeset:   3:eb5a0daa2192
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C0
-  |
-  | x  changeset:   2:0dec01379d3b
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     B0
-  | |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
- Actual test
- -----------
-
-Check that debugobshistory on the first folded revision show only
-the revision with the target
-  $ hg olog --hidden 471f378eab4c
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as eb5a0daa2192 (glob)
-  
-Check that debugobshistory on the second folded revision show only
-the revision with the target
-  $ hg olog --hidden 0dec01379d3b
-  x  0dec01379d3b (2) B0
-       rewritten by test (*20*) as eb5a0daa2192 (glob)
-  
-Check that debugobshistory on the successor revision show a coherent
-graph
-  $ hg olog eb5a0daa2192
-  @    eb5a0daa2192 (3) C0
-  |\
-  x |  0dec01379d3b (2) B0
-   /     rewritten by test (*20*) as eb5a0daa2192 (glob)
-  |
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as eb5a0daa2192 (glob)
-  
-  $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "eb5a0daa2192",
-          "debugobshistory.rev": 3,
-          "debugobshistory.shortdescription": "C0"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "eb5a0daa2192"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "eb5a0daa2192"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "0dec01379d3b",
-          "debugobshistory.rev": 2,
-          "debugobshistory.shortdescription": "B0"
-      }
-  ]
-  $ hg update 471f378eab4c
-  abort: hidden revision '471f378eab4c'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'desc(A0)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg update 0dec01379d3b
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  abort: hidden revision '0dec01379d3b'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'desc(B0)'
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-
-Test output with divergence
-===========================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-divergence
-  $ cd $TESTTMP/local-divergence
-  $ mkcommit ROOT
-  $ mkcommit A0
-  $ hg amend -m "A1"
-  $ hg log --hidden -G
-  @  changeset:   2:fdf9bde5129a
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A1
-  |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg update --hidden 'desc(A0)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: fdf9bde5129a)
-  $ hg amend -m "A2"
-  2 new divergent changesets
-  $ hg log --hidden -G
-  @  changeset:   3:65b757b745b9
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A2
-  |
-  | o  changeset:   2:fdf9bde5129a
-  |/   parent:      0:ea207398892e
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A1
-  |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-
-Check that debugobshistory on the divergent revision show both destinations
-  $ hg olog --hidden 471f378eab4c
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 65b757b745b9 (glob)
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-  $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "65b757b745b9"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              },
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "fdf9bde5129a"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-Check that debugobshistory on the first diverged revision show the revision
-and the diverent one
-  $ hg olog fdf9bde5129a
-  o  fdf9bde5129a (2) A1
-  |
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 65b757b745b9 (glob)
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-Check that debugobshistory on the second diverged revision show the revision
-and the diverent one
-  $ hg olog 65b757b745b9
-  @  65b757b745b9 (3) A2
-  |
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 65b757b745b9 (glob)
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-Check that debugobshistory on the both diverged revision show a coherent
-graph
-  $ hg olog '65b757b745b9+fdf9bde5129a'
-  @  65b757b745b9 (3) A2
-  |
-  | o  fdf9bde5129a (2) A1
-  |/
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as 65b757b745b9 (glob)
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-  $ hg olog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "65b757b745b9",
-          "debugobshistory.rev": 3,
-          "debugobshistory.shortdescription": "A2"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "65b757b745b9"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              },
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "fdf9bde5129a"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      },
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "fdf9bde5129a",
-          "debugobshistory.rev": 2,
-          "debugobshistory.shortdescription": "A1"
-      }
-  ]
-  $ hg update 471f378eab4c
-  abort: hidden revision '471f378eab4c'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'desc(A0)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (471f378eab4c)
-  (471f378eab4c has diverged, use 'hg evolve -list --divergent' to resolve the issue)
-
-Test output with amended + folded commit
-========================================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-amend-fold
-  $ cd $TESTTMP/local-amend-fold
-  $ mkcommit ROOT
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg amend -m "B1"
-  $ hg log --hidden -G
-  @  changeset:   3:b7ea6d14e664
-  |  tag:         tip
-  |  parent:      1:471f378eab4c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B1
-  |
-  | x  changeset:   2:0dec01379d3b
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     B0
-  |
-  o  changeset:   1:471f378eab4c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg fold --exact -r 'desc(A0) + desc(B1)' --date "0 0" -m "C0"
-  2 changesets folded
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log --hidden -G
-  @  changeset:   4:eb5a0daa2192
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C0
-  |
-  | x  changeset:   3:b7ea6d14e664
-  | |  parent:      1:471f378eab4c
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     B1
-  | |
-  | | x  changeset:   2:0dec01379d3b
-  | |/   user:        test
-  | |    date:        Thu Jan 01 00:00:00 1970 +0000
-  | |    summary:     B0
-  | |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
- Actual test
- -----------
-
-Check that debugobshistory on head show a coherent graph
-  $ hg olog eb5a0daa2192
-  @    eb5a0daa2192 (4) C0
-  |\
-  x |  471f378eab4c (1) A0
-   /     rewritten by test (*20*) as eb5a0daa2192 (glob)
-  |
-  x  b7ea6d14e664 (3) B1
-  |    rewritten by test (*20*) as eb5a0daa2192 (glob)
-  |
-  x  0dec01379d3b (2) B0
-       rewritten by test (*20*) as b7ea6d14e664 (glob)
-  
-  $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [],
-          "debugobshistory.node": "eb5a0daa2192",
-          "debugobshistory.rev": 4,
-          "debugobshistory.shortdescription": "C0"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "eb5a0daa2192"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "b7ea6d14e664",
-          "debugobshistory.rev": 3,
-          "debugobshistory.shortdescription": "B1"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "b7ea6d14e664"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "0dec01379d3b",
-          "debugobshistory.rev": 2,
-          "debugobshistory.shortdescription": "B0"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0 (glob)
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "eb5a0daa2192"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "471f378eab4c",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A0"
-      }
-  ]
-  $ hg update 471f378eab4c
-  abort: hidden revision '471f378eab4c'!
-  (use --hidden to access hidden revisions)
-  [255]
-  $ hg update --hidden 'desc(A0)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg update --hidden 0dec01379d3b
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg update 0dec01379d3b
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg update --hidden 'desc(B0)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-
-Test output with pushed and pulled obs markers
-==============================================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/local-remote-markers-1
-  $ cd $TESTTMP/local-remote-markers-1
-  $ mkcommit ROOT
-  $ mkcommit A0
-  $ hg log --hidden -G
-  @  changeset:   1:471f378eab4c
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ hg clone $TESTTMP/local-remote-markers-1 $TESTTMP/local-remote-markers-2
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd $TESTTMP/local-remote-markers-2
-  $ hg log --hidden -G
-  @  changeset:   1:471f378eab4c
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-  $ cd $TESTTMP/local-remote-markers-1
-  $ hg amend -m "A1"
-  $ hg amend -m "A2"
-  $ hg log --hidden -G
-  @  changeset:   3:7a230b46bf61
-  |  tag:         tip
-  |  parent:      0:ea207398892e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A2
-  |
-  | x  changeset:   2:fdf9bde5129a
-  |/   parent:      0:ea207398892e
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A1
-  |
-  | x  changeset:   1:471f378eab4c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     A0
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
- Actual test
- -----------
-
-  $ hg olog 7a230b46bf61
-  @  7a230b46bf61 (3) A2
-  |
-  x  fdf9bde5129a (2) A1
-  |    rewritten by test (*20*) as 7a230b46bf61 (glob)
-  |
-  x  471f378eab4c (1) A0
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-  $ cd $TESTTMP/local-remote-markers-2
-  $ hg pull
-  pulling from $TESTTMP/local-remote-markers-1
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 0 changes to 1 files (+1 heads)
-  2 new obsolescence markers
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  working directory parent is obsolete! (471f378eab4c)
-  (use 'hg evolve' to update to its successor: 7a230b46bf61)
-Check that debugobshistory works with markers pointing to missing local
-changectx
-  $ hg olog 7a230b46bf61
-  o  7a230b46bf61 (2) A2
-  |
-  x  fdf9bde5129a
-  |    rewritten by test (*20*) as 7a230b46bf61 (glob)
-  |
-  @  471f378eab4c (1) A0
-       rewritten by test (*20*) as fdf9bde5129a (glob)
-  
-  $ hg olog 7a230b46bf61 --color=debug
-  o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
-  |
-  x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
-  |    [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*20*)] as [evolve.node|7a230b46bf61] (glob)
-  |
-  @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
-       [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*20*)] as [evolve.node|fdf9bde5129a] (glob)
-  
-
-Test with cycle
-===============
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/cycle
-  $ cd $TESTTMP/cycle
-  $ mkcommit ROOT
-  $ mkcommit A
-  $ mkcommit B
-  $ mkcommit C
-  $ hg log -G
-  @  changeset:   3:a8df460dbbfe
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C
-  |
-  o  changeset:   2:c473644ee0e9
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B
-  |
-  o  changeset:   1:2a34000d3544
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Create a cycle
-  $ hg prune -s "desc(B)" "desc(A)"
-  1 changesets pruned
-  2 new unstable changesets
-  $ hg prune -s "desc(C)" "desc(B)"
-  1 changesets pruned
-  $ hg prune -s "desc(A)" "desc(C)"
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  working directory now at 2a34000d3544
-  1 changesets pruned
-  $ hg log --hidden -G
-  x  changeset:   3:a8df460dbbfe
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C
-  |
-  x  changeset:   2:c473644ee0e9
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B
-  |
-  @  changeset:   1:2a34000d3544
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-
-Check that debugobshistory never crash on a cycle
-
-  $ hg olog "desc(A)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten by test (*20*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*20*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*20*) as a8df460dbbfe (glob)
-  |
-
-  $ hg olog "desc(B)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten by test (*20*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*20*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*20*) as a8df460dbbfe (glob)
-  |
-
-  $ hg olog "desc(C)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten by test (*20*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*20*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*20*) as a8df460dbbfe (glob)
-  |
-
-Test with multiple cyles
-========================
-
-Test setup
-----------
-
-  $ hg init $TESTTMP/multiple-cycle
-  $ cd $TESTTMP/multiple-cycle
-  $ mkcommit ROOT
-  $ mkcommit A
-  $ mkcommit B
-  $ mkcommit C
-  $ mkcommit D
-  $ mkcommit E
-  $ mkcommit F
-  $ hg log -G
-  @  changeset:   6:d9f908fde1a1
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     F
-  |
-  o  changeset:   5:0da815c333f6
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     E
-  |
-  o  changeset:   4:868d2e0eb19c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     D
-  |
-  o  changeset:   3:a8df460dbbfe
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C
-  |
-  o  changeset:   2:c473644ee0e9
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B
-  |
-  o  changeset:   1:2a34000d3544
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Create a first cycle
-  $ hg prune -s "desc(B)" "desc(A)"
-  1 changesets pruned
-  5 new unstable changesets
-  $ hg prune -s "desc(C)" "desc(B)"
-  1 changesets pruned
-  $ hg prune --split -s "desc(A)" -s "desc(D)" "desc(C)"
-  1 changesets pruned
-And create a second one
-  $ hg prune -s "desc(E)" "desc(D)"
-  1 changesets pruned
-  $ hg prune -s "desc(F)" "desc(E)"
-  1 changesets pruned
-  $ hg prune -s "desc(D)" "desc(F)"
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  working directory now at 868d2e0eb19c
-  1 changesets pruned
-  $ hg log --hidden -G
-  x  changeset:   6:d9f908fde1a1
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     F
-  |
-  x  changeset:   5:0da815c333f6
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     E
-  |
-  @  changeset:   4:868d2e0eb19c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     D
-  |
-  x  changeset:   3:a8df460dbbfe
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     C
-  |
-  x  changeset:   2:c473644ee0e9
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     B
-  |
-  x  changeset:   1:2a34000d3544
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     A
-  |
-  o  changeset:   0:ea207398892e
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     ROOT
-  
-Actual test
------------
-
-Check that debugobshistory never crash on a cycle
-
-  $ hg olog "desc(D)" --hidden
-  x  0da815c333f6 (5) E
-  |    rewritten by test (*20*) as d9f908fde1a1 (glob)
-  |
-  @    868d2e0eb19c (4) D
-  |\     rewritten by test (*20*) as 0da815c333f6 (glob)
-  | |
-  | x  d9f908fde1a1 (6) F
-  | |    rewritten by test (*20*) as 868d2e0eb19c (glob)
-  | |
-  +---x  2a34000d3544 (1) A
-  | |      rewritten by test (*20*) as c473644ee0e9 (glob)
-  | |
-  x |  a8df460dbbfe (3) C
-  | |    rewritten by test (*20*) as 2a34000d3544, 868d2e0eb19c (glob)
-  | |
-  x |  c473644ee0e9 (2) B
-  | |    rewritten by test (*20*) as a8df460dbbfe (glob)
-  | |
-
-Check the json output is valid in this case
-
-  $ hg olog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
-  [
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "0da815c333f6"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "868d2e0eb19c",
-          "debugobshistory.rev": 4,
-          "debugobshistory.shortdescription": "D"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "868d2e0eb19c"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "d9f908fde1a1",
-          "debugobshistory.rev": 6,
-          "debugobshistory.shortdescription": "F"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "d9f908fde1a1"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "0da815c333f6",
-          "debugobshistory.rev": 5,
-          "debugobshistory.shortdescription": "E"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "2a34000d3544",
-                      "868d2e0eb19c"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "a8df460dbbfe",
-          "debugobshistory.rev": 3,
-          "debugobshistory.shortdescription": "C"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "a8df460dbbfe"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "c473644ee0e9",
-          "debugobshistory.rev": 2,
-          "debugobshistory.shortdescription": "B"
-      },
-      {
-          "debugobshistory.markers": [
-              {
-                  "debugobshistory.marker_date": [
-                      *, (glob)
-                      0
-                  ],
-                  "debugobshistory.marker_user": "test",
-                  "debugobshistory.succnodes": [
-                      "c473644ee0e9"
-                  ],
-                  "debugobshistory.verb": "rewritten"
-              }
-          ],
-          "debugobshistory.node": "2a34000d3544",
-          "debugobshistory.rev": 1,
-          "debugobshistory.shortdescription": "A"
-      }
-  ]
--- a/tests/test-evolve-serveronly.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-evolve-serveronly.t	Mon May 22 15:42:13 2017 +0200
@@ -10,7 +10,7 @@
   > [phases]
   > publish = False
   > [experimental]
-  > bundle2-exp=False # < Mercurial-4.0
+  > bundle2-exp=False
   > [devel]
   > legacy.exchange=bundle1
   > [extensions]
--- a/tests/test-evolve-topic.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-
-Check we can find the topic extensions
-
-  $ cat >> $HGRCPATH <<EOF
-  > [defaults]
-  > amend=-d "0 0"
-  > fold=-d "0 0"
-  > [phases]
-  > publish = False
-  > [ui]
-  > logtemplate = {rev} - \{{get(namespaces, "topics")}} {node|short} {desc} ({phase})\n
-  > [diff]
-  > git = 1
-  > unified = 0
-  > [extensions]
-  > rebase = 
-  > EOF
-  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
-  $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH
-
-  $ mkcommit() {
-  >    echo "$1" > "$1"
-  >    hg add "$1"
-  >    hg ci -m "add $1"
-  > }
-
-Create a simple setup
-
-  $ hg init repoa
-  $ cd repoa
-  $ mkcommit aaa
-  $ mkcommit bbb
-  $ hg topic foo
-  $ mkcommit ccc
-  $ mkcommit ddd
-  $ mkcommit eee
-  $ mkcommit fff
-  $ hg topic bar
-  $ mkcommit ggg
-  $ mkcommit hhh
-  $ mkcommit iii
-  $ mkcommit jjj
-
-  $ hg log -G
-  @  9 - {bar} 1d964213b023 add jjj (draft)
-  |
-  o  8 - {bar} fcab990f3261 add iii (draft)
-  |
-  o  7 - {bar} b0c2554835ac add hhh (draft)
-  |
-  o  6 - {bar} c748293f1c1a add ggg (draft)
-  |
-  o  5 - {foo} 6a6b7365c751 add fff (draft)
-  |
-  o  4 - {foo} 3969ab847d9c add eee (draft)
-  |
-  o  3 - {foo} 4e3a154f38c7 add ddd (draft)
-  |
-  o  2 - {foo} cced9bac76e3 add ccc (draft)
-  |
-  o  1 - {} a4dbed0837ea add bbb (draft)
-  |
-  o  0 - {} 199cc73e9a0b add aaa (draft)
-  
-
-Test that evolve --all evolve the current topic
------------------------------------------------
-
-make a mess
-
-  $ hg up foo
-  switching to topic foo
-  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  $ hg topic -l 
-  ### topic: foo (?)
-  ### branch: default (?)
-  t4@ add fff (current)
-  t3: add eee
-  t2: add ddd
-  t1: add ccc
-    ^ add bbb
-  $ hg up 'desc(ddd)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ echo ddd >> ddd
-  $ hg amend
-  6 new unstable changesets
-  $ hg up 'desc(fff)'
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo fff >> fff
-  $ hg amend
-
-  $ hg log -G
-  @  13 - {foo} e104f49bab28 add fff (draft)
-  |
-  | o  11 - {foo} d9cacd156ffc add ddd (draft)
-  | |
-  | | o  9 - {bar} 1d964213b023 add jjj (draft)
-  | | |
-  | | o  8 - {bar} fcab990f3261 add iii (draft)
-  | | |
-  | | o  7 - {bar} b0c2554835ac add hhh (draft)
-  | | |
-  | | o  6 - {bar} c748293f1c1a add ggg (draft)
-  | | |
-  +---x  5 - {foo} 6a6b7365c751 add fff (draft)
-  | |
-  o |  4 - {foo} 3969ab847d9c add eee (draft)
-  | |
-  x |  3 - {foo} 4e3a154f38c7 add ddd (draft)
-  |/
-  o  2 - {foo} cced9bac76e3 add ccc (draft)
-  |
-  o  1 - {} a4dbed0837ea add bbb (draft)
-  |
-  o  0 - {} 199cc73e9a0b add aaa (draft)
-  
-
-Run evolve --all
-
-  $ hg evolve --all
-  move:[4] add eee
-  atop:[11] add ddd
-  move:[13] add fff
-  atop:[14] add eee
-  working directory is now at 070c5573d8f9
-  $ hg log -G
-  @  15 - {foo} 070c5573d8f9 add fff (draft)
-  |
-  o  14 - {foo} 42b49017ff90 add eee (draft)
-  |
-  o  11 - {foo} d9cacd156ffc add ddd (draft)
-  |
-  | o  9 - {bar} 1d964213b023 add jjj (draft)
-  | |
-  | o  8 - {bar} fcab990f3261 add iii (draft)
-  | |
-  | o  7 - {bar} b0c2554835ac add hhh (draft)
-  | |
-  | o  6 - {bar} c748293f1c1a add ggg (draft)
-  | |
-  | x  5 - {foo} 6a6b7365c751 add fff (draft)
-  | |
-  | x  4 - {foo} 3969ab847d9c add eee (draft)
-  | |
-  | x  3 - {foo} 4e3a154f38c7 add ddd (draft)
-  |/
-  o  2 - {foo} cced9bac76e3 add ccc (draft)
-  |
-  o  1 - {} a4dbed0837ea add bbb (draft)
-  |
-  o  0 - {} 199cc73e9a0b add aaa (draft)
-  
-
-Test that evolve does not loose topic information
--------------------------------------------------
-
-  $ hg evolve --rev 'topic(bar)'
-  move:[6] add ggg
-  atop:[15] add fff
-  move:[7] add hhh
-  atop:[16] add ggg
-  move:[8] add iii
-  atop:[17] add hhh
-  move:[9] add jjj
-  atop:[18] add iii
-  working directory is now at 9bf430c106b7
-  $ hg log -G
-  @  19 - {bar} 9bf430c106b7 add jjj (draft)
-  |
-  o  18 - {bar} d2dc89c57700 add iii (draft)
-  |
-  o  17 - {bar} 20bc4d02aa62 add hhh (draft)
-  |
-  o  16 - {bar} 16d6f664b17c add ggg (draft)
-  |
-  o  15 - {foo} 070c5573d8f9 add fff (draft)
-  |
-  o  14 - {foo} 42b49017ff90 add eee (draft)
-  |
-  o  11 - {foo} d9cacd156ffc add ddd (draft)
-  |
-  o  2 - {foo} cced9bac76e3 add ccc (draft)
-  |
-  o  1 - {} a4dbed0837ea add bbb (draft)
-  |
-  o  0 - {} 199cc73e9a0b add aaa (draft)
-  
-
-Tests next and prev behavior
-============================
-
-Basic move are restricted to the current topic
-
-  $ hg up foo
-  switching to topic foo
-  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  $ hg prev
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  [14] add eee
-  $ hg next
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  [15] add fff
-  $ hg next
-  no children on topic "foo"
-  do you want --no-topic
-  [1]
-  $ hg next --no-topic
-  switching to topic bar
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  [16] add ggg
-  $ hg prev
-  no parent in topic "bar"
-  (do you want --no-topic)
-  $ hg prev --no-topic
-  switching to topic foo
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  [15] add fff
--- a/tests/test-evolve.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-evolve.t	Mon May 22 15:42:13 2017 +0200
@@ -767,20 +767,6 @@
   $ hg debugrebuildstate
   $ hg st
 
-Test olog
-
-  $ hg olog | head -n 10 # hg touch makes the output unstable (fix it with devel option for more stable touch)
-  @    d26d339c513f (12) add 4
-  |\
-  x |    af636757ce3b (11) add 3
-  |\ \     rewritten by test (*) as d26d339c513f (glob)
-  | | |
-  | \ \
-  | |\ \
-  | | | x  ce341209337f (4) add 4
-  | | |      rewritten by test (*) as d26d339c513f (glob)
-  | | |
-
 Test obsstore stat
 
   $ hg debugobsstorestat
@@ -1155,7 +1141,7 @@
    summary       summarize working directory state
    update        update working directory (or switch revisions)
   
-  (use 'hg help' for the full list of commands or 'hg -v' for details)
+  (use "hg help" for the full list of commands or "hg -v" for details)
   [255]
   $ hg fold
   hg: unknown command 'fold'
@@ -1181,7 +1167,7 @@
    summary       summarize working directory state
    update        update working directory (or switch revisions)
   
-  (use 'hg help' for the full list of commands or 'hg -v' for details)
+  (use "hg help" for the full list of commands or "hg -v" for details)
   [255]
 Enabling commands selectively, only fold enabled, next is still unknown
   $ cat >> $HGRCPATH <<EOF
@@ -1217,7 +1203,7 @@
    summary       summarize working directory state
    update        update working directory (or switch revisions)
   
-  (use 'hg help' for the full list of commands or 'hg -v' for details)
+  (use "hg help" for the full list of commands or "hg -v" for details)
   [255]
 
 Restore all of the evolution features
--- a/tests/test-obsolete.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-obsolete.t	Mon May 22 15:42:13 2017 +0200
@@ -688,14 +688,6 @@
   [4] add obsol_c'
   [10] add obsol_c
   [2]
-  $ hg olog
-  @  0d3f46688ccc (3) add obsol_c
-  |    rewritten by test (*) as 2033b4e49474 (glob)
-  |    rewritten by test (Thu Jan 01 00:00:00 1970 +0000) as 725c380fe99b
-  |
-  x  4538525df7e2 (2) add c
-       rewritten by test (Thu Jan 01 00:00:00 1970 +0000) as 0d3f46688ccc
-  
 
 Check import reports new unstable changeset:
 
--- a/tests/test-prev-next.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-prev-next.t	Mon May 22 15:42:13 2017 +0200
@@ -231,7 +231,7 @@
   $ hg amend --edit &
   $ sleep 1
   $ hg prev
-  waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
+  waiting for lock on working directory of $TESTTMP/repo held by '*' (glob)
   got lock after [4-6] seconds (re)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [0] one
@@ -240,7 +240,7 @@
   $ hg amend --edit &
   $ sleep 1
   $ hg next --evolve
-  waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
+  waiting for lock on working directory of $TESTTMP/repo held by '*' (glob)
   1 new unstable changesets
   got lock after [4-6] seconds (re)
   move:[2] two
--- a/tests/test-stabilize-result.t	Mon May 22 15:34:36 2017 +0200
+++ b/tests/test-stabilize-result.t	Mon May 22 15:42:13 2017 +0200
@@ -98,7 +98,7 @@
   +newer a
   $ hg evolve --continue
   grafting 5:3655f0f50885 "newer a"
-  abort: unresolved merge conflicts (see 'hg help resolve')
+  abort: unresolved merge conflicts (see "hg help resolve")
   [255]
   $ hg resolve -m a
   (no more unresolved files)
--- a/tests/test-topic-dest.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,492 +0,0 @@
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-
-  $ hg init jungle
-  $ cd jungle
-  $ cat <<EOF >> .hg/hgrc
-  > [extensions]
-  > rebase=
-  > histedit=
-  > [phases]
-  > publish=false
-  > EOF
-  $ cat <<EOF >> $HGRCPATH
-  > [ui]
-  > logtemplate = '{rev} ({topics}) {desc}\n'
-  > EOF
-
-  $ for x in alpha beta gamma delta ; do
-  >   echo file $x >> $x
-  >   hg add $x
-  >   hg ci -m "c_$x"
-  > done
-
-Test NGTip feature
-==================
-
-Simple linear case
-
-  $ echo babar >> jungle
-  $ hg add jungle
-  $ hg ci -t elephant -m babar
-
-  $ hg log -G
-  @  4 (elephant) babar
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg log -r 'ngtip(.)'
-  3 () c_delta
-  $ hg log -r 'default'
-  3 () c_delta
-
-
-multiple heads with topic
-
-  $ hg up "desc('c_beta')"
-  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
-  $ echo zephir >> jungle
-  $ hg add jungle
-  $ hg ci -t monkey -m zephir
-  $ hg log -G
-  @  5 (monkey) zephir
-  |
-  | o  4 (elephant) babar
-  | |
-  | o  3 () c_delta
-  | |
-  | o  2 () c_gamma
-  |/
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg log -r 'ngtip(.)'
-  3 () c_delta
-  $ hg log -r 'default'
-  3 () c_delta
-
-one of the head is a valid tip
-
-  $ hg up "desc('c_delta')"
-  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ echo epsilon >> epsilon
-  $ hg add epsilon
-  $ hg ci -m "c_epsilon"
-  $ hg log -G
-  @  6 () c_epsilon
-  |
-  | o  5 (monkey) zephir
-  | |
-  +---o  4 (elephant) babar
-  | |
-  o |  3 () c_delta
-  | |
-  o |  2 () c_gamma
-  |/
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg log -r 'ngtip(.)'
-  6 () c_epsilon
-  $ hg log -r 'default'
-  6 () c_epsilon
-
-rebase destination
-==================
-
-rebase on branch ngtip
-
-  $ hg up elephant
-  switching to topic elephant
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg rebase
-  rebasing 4:cb7ae72f4a80 "babar"
-  $ hg log -G
-  @  7 (elephant) babar
-  |
-  o  6 () c_epsilon
-  |
-  | o  5 (monkey) zephir
-  | |
-  o |  3 () c_delta
-  | |
-  o |  2 () c_gamma
-  |/
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg up monkey
-  switching to topic monkey
-  1 files updated, 0 files merged, 3 files removed, 0 files unresolved
-  $ hg rebase
-  rebasing 5:d832ddc604ec "zephir"
-  $ hg log -G
-  @  8 (monkey) zephir
-  |
-  | o  7 (elephant) babar
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-Rebase on other topic heads if any
-
-  $ hg up 'desc(c_delta)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ echo "General Huc" >> monkeyville
-  $ hg add monkeyville
-  $ hg ci -t monkey -m Huc
-  $ hg log -G
-  @  9 (monkey) Huc
-  |
-  | o  8 (monkey) zephir
-  | |
-  | | o  7 (elephant) babar
-  | |/
-  | o  6 () c_epsilon
-  |/
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg rebase
-  rebasing 9:d79a104e2902 "Huc" (tip)
-  $ hg log -G
-  @  10 (monkey) Huc
-  |
-  o  8 (monkey) zephir
-  |
-  | o  7 (elephant) babar
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-merge destination
-=================
-
-  $ hg up 'ngtip(default)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg up default
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo zeta >> zeta
-  $ hg add zeta
-  $ hg ci -m "c_zeta"
-  $ hg log -G
-  @  11 () c_zeta
-  |
-  | o  10 (monkey) Huc
-  | |
-  | o  8 (monkey) zephir
-  |/
-  | o  7 (elephant) babar
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ hg up elephant
-  switching to topic elephant
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg rebase -d 'desc(c_zeta)' # make sure tip is elsewhere
-  rebasing 7:8d0b77140b05 "babar"
-  $ hg up monkey
-  switching to topic monkey
-  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg merge
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  (branch merge, don't forget to commit)
-  $ hg topic
-     elephant
-   * monkey
-  $ hg ci -m 'merge with default'
-  $ hg topic
-     elephant
-   * monkey
-  $ hg log -G
-  @    13 (monkey) merge with default
-  |\
-  | | o  12 (elephant) babar
-  | |/
-  | o  11 () c_zeta
-  | |
-  o |  10 (monkey) Huc
-  | |
-  o |  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-
-Check pull --rebase
--------------------
-
-(we broke it a some point)
-
-  $ cd ..
-  $ hg clone jungle other --rev '2'
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 3 changes to 3 files
-  updating to branch default
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd other
-  $ echo other > other
-  $ hg add other
-  $ hg ci -m 'c_other'
-  $ hg pull -r default --rebase
-  pulling from $TESTTMP/jungle (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 3 changes to 3 files (+1 heads)
-  rebasing 3:dbc48dd9e743 "c_other"
-  $ hg log -G
-  @  7 () c_other
-  |
-  o  6 () c_zeta
-  |
-  o  5 () c_epsilon
-  |
-  o  4 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-  $ cd ../jungle
-
-
-Default destination for update
-===============================
-
-initial setup
-
-  $ hg up elephant
-  switching to topic elephant
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ echo arthur >> jungle
-  $ hg ci -m arthur
-  $ echo pompadour >> jungle
-  $ hg ci -m pompadour
-  $ hg up 'roots(all())'
-  0 files updated, 0 files merged, 6 files removed, 0 files unresolved
-  $ hg log -G
-  o  15 (elephant) pompadour
-  |
-  o  14 (elephant) arthur
-  |
-  | o    13 (monkey) merge with default
-  | |\
-  o---+  12 (elephant) babar
-   / /
-  | o  11 () c_zeta
-  | |
-  o |  10 (monkey) Huc
-  | |
-  o |  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  @  0 () c_alpha
-  
-
-testing default destination on a branch
-
-  $ hg up
-  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log -G
-  o  15 (elephant) pompadour
-  |
-  o  14 (elephant) arthur
-  |
-  | o    13 (monkey) merge with default
-  | |\
-  o---+  12 (elephant) babar
-   / /
-  | @  11 () c_zeta
-  | |
-  o |  10 (monkey) Huc
-  | |
-  o |  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-extra setup for topic
-(making sure tip is not the topic)
-
-  $ hg up 'desc(c_zeta)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo 'eta' >> 'eta'
-  $ hg add 'eta'
-  $ hg commit -m 'c_eta'
-  $ hg log -G
-  @  16 () c_eta
-  |
-  | o  15 (elephant) pompadour
-  | |
-  | o  14 (elephant) arthur
-  | |
-  +---o  13 (monkey) merge with default
-  | | |
-  | o |  12 (elephant) babar
-  |/ /
-  o |  11 () c_zeta
-  | |
-  | o  10 (monkey) Huc
-  | |
-  | o  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-Testing default destination for topic
-
-  $ hg up 'roots(topic(elephant))'
-  switching to topic elephant
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg up
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log -G
-  o  16 () c_eta
-  |
-  | @  15 (elephant) pompadour
-  | |
-  | o  14 (elephant) arthur
-  | |
-  +---o  13 (monkey) merge with default
-  | | |
-  | o |  12 (elephant) babar
-  |/ /
-  o |  11 () c_zeta
-  | |
-  | o  10 (monkey) Huc
-  | |
-  | o  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-Testing default destination for topic
-
-  $ hg up 'p1(roots(topic(elephant)))'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg topic elephant
-  $ hg up
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log -G
-  o  16 () c_eta
-  |
-  | @  15 (elephant) pompadour
-  | |
-  | o  14 (elephant) arthur
-  | |
-  +---o  13 (monkey) merge with default
-  | | |
-  | o |  12 (elephant) babar
-  |/ /
-  o |  11 () c_zeta
-  | |
-  | o  10 (monkey) Huc
-  | |
-  | o  8 (monkey) zephir
-  |/
-  o  6 () c_epsilon
-  |
-  o  3 () c_delta
-  |
-  o  2 () c_gamma
-  |
-  o  1 () c_beta
-  |
-  o  0 () c_alpha
-  
-
-Default destination for histedit
-================================
-
-By default histedit should edit with the current topic only
-(even when based on other draft
-
-  $ hg phase 'desc(c_zeta)'
-  11: draft
-  $ HGEDITOR=cat hg histedit | grep pick
-  pick e44744d9ad73 12 babar
-  pick 38eea8439aee 14 arthur
-  pick 411315c48bdc 15 pompadour
-  #  p, pick = use commit
--- a/tests/test-topic-push.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-
-  $ cat << EOF >> $HGRCPATH
-  > [ui]
-  > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n
-  > [ui]
-  > ssh =python "$RUNTESTDIR/dummyssh"
-  > EOF
-
-  $ hg init main
-  $ hg init draft
-  $ cat << EOF >> draft/.hg/hgrc
-  > [phases]
-  > publish=False
-  > EOF
-  $ hg clone main client
-  updating to branch default
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cat << EOF >> client/.hg/hgrc
-  > [paths]
-  > draft=../draft
-  > EOF
-
-
-Testing core behavior to make sure we did not break anything
-============================================================
-
-Pushing a first changeset
-
-  $ cd client
-  $ echo aaa > aaa
-  $ hg add aaa
-  $ hg commit -m 'CA'
-  $ hg outgoing -G
-  comparing with $TESTTMP/main (glob)
-  searching for changes
-  @  0 default  draft CA
-  
-  $ hg push
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-
-Pushing two heads
-
-  $ echo aaa > bbb
-  $ hg add bbb
-  $ hg commit -m 'CB'
-  $ echo aaa > ccc
-  $ hg up 'desc(CA)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg add ccc
-  $ hg commit -m 'CC'
-  created new head
-  $ hg outgoing -G
-  comparing with $TESTTMP/main (glob)
-  searching for changes
-  @  2 default  draft CC
-  
-  o  1 default  draft CB
-  
-  $ hg push
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  abort: push creates new remote head 9fe81b7f425d!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-  $ hg outgoing -r 'desc(CB)' -G
-  comparing with $TESTTMP/main (glob)
-  searching for changes
-  o  1 default  draft CB
-  
-  $ hg push -r 'desc(CB)'
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-
-Pushing a new branch
-
-  $ hg branch mountain
-  marked working directory as branch mountain
-  (branches are permanent and global, did you want a bookmark?)
-  $ hg commit --amend
-  $ hg outgoing -G
-  comparing with $TESTTMP/main (glob)
-  searching for changes
-  @  4 mountain  draft CC
-  
-  $ hg push 
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  abort: push creates new remote branches: mountain!
-  (use 'hg push --new-branch' to create new remote branches)
-  [255]
-  $ hg push --new-branch
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  2 new obsolescence markers
-
-Including on non-publishing
-
-  $ hg push --new-branch draft
-  pushing to $TESTTMP/draft (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 3 changes to 3 files (+1 heads)
-  2 new obsolescence markers
-
-Testing topic behavior
-======================
-
-Local peer tests
-----------------
-
-  $ hg up -r 'desc(CA)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg topic babar
-  $ echo aaa > ddd
-  $ hg add ddd
-  $ hg commit -m 'CD'
-  $ hg log -G # keep track of phase because I saw some strange bug during developement
-  @  5 default babar draft CD
-  |
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Pushing a new topic to a non publishing server should not be seen as a new head
-
-  $ hg push draft
-  pushing to $TESTTMP/draft (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  $ hg log -G
-  @  5 default babar draft CD
-  |
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Pushing a new topic to a publishing server should be seen as a new head
-
-  $ hg push
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  abort: push creates new remote head 67f579af159d!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-  $ hg log -G
-  @  5 default babar draft CD
-  |
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-wireprotocol tests
-------------------
-
-  $ hg up -r 'desc(CA)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg topic celeste
-  $ echo aaa > eee
-  $ hg add eee
-  $ hg commit -m 'CE'
-  $ hg log -G # keep track of phase because I saw some strange bug during developement
-  @  6 default celeste draft CE
-  |
-  | o  5 default babar draft CD
-  |/
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Pushing a new topic to a non publishing server without topic -> new head
-
-  $ cat << EOF >> ../draft/.hg/hgrc
-  > [extensions]
-  > topic=!
-  > EOF
-  $ hg push ssh://user@dummy/draft
-  pushing to ssh://user@dummy/draft
-  searching for changes
-  abort: push creates new remote head 84eaf32db6c3!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-  $ hg log -G
-  @  6 default celeste draft CE
-  |
-  | o  5 default babar draft CD
-  |/
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Pushing a new topic to a non publishing server should not be seen as a new head
-
-  $ printf "topic=" >> ../draft/.hg/hgrc
-  $ hg config extensions.topic >> ../draft/.hg/hgrc
-  $ hg push ssh://user@dummy/draft
-  pushing to ssh://user@dummy/draft
-  searching for changes
-  remote: adding changesets
-  remote: adding manifests
-  remote: adding file changes
-  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
-  $ hg log -G
-  @  6 default celeste draft CE
-  |
-  | o  5 default babar draft CD
-  |/
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Pushing a new topic to a publishing server should be seen as a new head
-
-  $ hg push ssh://user@dummy/main
-  pushing to ssh://user@dummy/main
-  searching for changes
-  abort: push creates new remote head 67f579af159d!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-  $ hg log -G
-  @  6 default celeste draft CE
-  |
-  | o  5 default babar draft CD
-  |/
-  | o  4 mountain  public CC
-  |/
-  | o  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Check that we reject multiple head on the same topic
-----------------------------------------------------
-
-  $ hg up 'desc(CB)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg topic babar
-  $ echo aaa > fff
-  $ hg add fff
-  $ hg commit -m 'CF'
-  $ hg log -G
-  @  7 default babar draft CF
-  |
-  | o  6 default celeste draft CE
-  | |
-  | | o  5 default babar draft CD
-  | |/
-  | | o  4 mountain  public CC
-  | |/
-  o |  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-  $ hg push draft
-  pushing to $TESTTMP/draft (glob)
-  searching for changes
-  abort: push creates new remote head f0bc62a661be on branch 'default:babar'!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-Multiple head on a branch merged in a topic changesets
-------------------------------------------------------------------------
-
-
-  $ hg up 'desc(CA)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ echo aaa > ggg
-  $ hg add ggg
-  $ hg commit -m 'CG'
-  created new head
-  $ hg up 'desc(CF)'
-  switching to topic babar
-  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg merge 'desc(CG)'
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  (branch merge, don't forget to commit)
-  $ hg commit -m 'CM'
-  $ hg log -G
-  @    9 default babar draft CM
-  |\
-  | o  8 default  draft CG
-  | |
-  o |  7 default babar draft CF
-  | |
-  | | o  6 default celeste draft CE
-  | |/
-  | | o  5 default babar draft CD
-  | |/
-  | | o  4 mountain  public CC
-  | |/
-  o |  1 default  public CB
-  |/
-  o  0 default  public CA
-  
-
-Reject when pushing to draft
-
-  $ hg push draft -r .
-  pushing to $TESTTMP/draft (glob)
-  searching for changes
-  abort: push creates new remote head 4937c4cad39e!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-
-Reject when pushing to publishing
-
-  $ hg push -r .
-  pushing to $TESTTMP/main (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 2 changes to 2 files
-
-  $ cd ..
-
-Test phase move
-==================================
-
-setup, two repo knowns about two small topic branch
-
-  $ hg init repoA
-  $ hg clone repoA repoB
-  updating to branch default
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cat << EOF >> repoA/.hg/hgrc
-  > [phases]
-  > publish=False
-  > EOF
-  $ cat << EOF >> repoB/.hg/hgrc
-  > [phases]
-  > publish=False
-  > EOF
-  $ cd repoA
-  $ echo aaa > base
-  $ hg add base
-  $ hg commit -m 'CBASE'
-  $ echo aaa > aaa
-  $ hg add aaa
-  $ hg topic topicA
-  $ hg commit -m 'CA'
-  $ hg up 'desc(CBASE)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ echo aaa > bbb
-  $ hg add bbb
-  $ hg topic topicB
-  $ hg commit -m 'CB'
-  $ cd ..
-  $ hg push -R repoA repoB
-  pushing to repoB
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 3 changes to 3 files (+1 heads)
-  $ hg log -G -R repoA
-  @  2 default topicB draft CB
-  |
-  | o  1 default topicA draft CA
-  |/
-  o  0 default  draft CBASE
-  
-
-We turn different topic to public on each side,
-
-  $ hg -R repoA phase --public topicA
-  $ hg -R repoB phase --public topicB
-
-Pushing should complain because it create to heads on default
-
-  $ hg push -R repoA repoB
-  pushing to repoB
-  searching for changes
-  no changes found
-  abort: push create a new head on branch "default"
-  [255]
--- a/tests/test-topic-stack-data.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-Setup
-=====
-
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-
-  $ hg init test-list
-  $ cd test-list
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
-  $ cat <<EOF >> $HGRCPATH
-  > [experimental]
-  > # disable the new graph style until we drop 3.7 support
-  > graphstyle.missing = |
-  > # turn evolution on
-  > evolution=all
-  > EOF
-
-
-  $ mkcommit() {
-  >    echo "$1" > "$1"
-  >    hg add "$1"
-  >    hg ci -m "add $1"
-  > }
-
-Build some basic graph
-----------------------
-
-  $ for x in base_a base_b base_c base_d base_e ; do
-  >   mkcommit $x
-  > done
-
-Add another branch with two heads
-
-  $ hg up 'desc(base_a)'
-  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  $ hg branch lake
-  marked working directory as branch lake
-  (branches are permanent and global, did you want a bookmark?)
-  $ mkcommit lake_a
-  $ mkcommit lake_b
-  $ hg up 'desc(lake_a)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit lake_c
-  created new head
-
-
-Add some topics
----------------
-
-A simple topic that need rebasing
-
-  $ hg up 'desc(base_c)'
-  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg topic baz
-  $ mkcommit baz_a
-  $ mkcommit baz_b
-
-A simple topic with unstability
-
-  $ hg up 'desc(base_d)'
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg topic fuz
-  $ mkcommit fuz_a
-  $ mkcommit fuz_b
-  $ mkcommit fuz_c
-  $ hg up 'desc(fuz_a)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg commit --amend --message 'fuz1_a'
-
-A topic with multiple heads
-
-  $ hg up 'desc(base_e)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg topic bar
-  $ mkcommit bar_a
-  $ mkcommit bar_b
-  $ mkcommit bar_c
-  $ hg up 'desc(bar_b)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit bar_d
-  $ mkcommit bar_e
-  $ hg up 'desc(bar_d)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg commit --amend --message 'bar1_d'
-
-topic 'foo' on the multi headed branch
-
-  $ hg up 'desc(lake_a)'
-  1 files updated, 0 files merged, 7 files removed, 0 files unresolved
-  $ hg topic foo
-  $ mkcommit foo_a
-  $ mkcommit foo_b
-
-Summary
--------
-
-  $ hg summary
-  parent: 21:3e54b49a3113 tip
-   add foo_b
-  branch: lake
-  commit: (clean)
-  update: 2 new changesets (update)
-  phases: 22 draft
-  unstable: 3 changesets
-  topic:  foo
-  $ hg log --graph -T '{desc} ({branch}) [{topic}]'
-  @  add foo_b (lake) []
-  |
-  o  add foo_a (lake) []
-  |
-  | o  bar1_d (default) []
-  | |
-  | | o  add bar_e (default) []
-  | | |
-  | | x  add bar_d (default) []
-  | |/
-  | | o  add bar_c (default) []
-  | |/
-  | o  add bar_b (default) []
-  | |
-  | o  add bar_a (default) []
-  | |
-  | | o  fuz1_a (default) []
-  | | |
-  | | | o  add fuz_c (default) []
-  | | | |
-  | | | o  add fuz_b (default) []
-  | | | |
-  | | | x  add fuz_a (default) []
-  | | |/
-  | | | o  add baz_b (default) []
-  | | | |
-  | | | o  add baz_a (default) []
-  | | | |
-  +-------o  add lake_c (lake) []
-  | | | |
-  +-------o  add lake_b (lake) []
-  | | | |
-  o | | |  add lake_a (lake) []
-  | | | |
-  | o | |  add base_e (default) []
-  | |/ /
-  | o /  add base_d (default) []
-  | |/
-  | o  add base_c (default) []
-  | |
-  | o  add base_b (default) []
-  |/
-  o  add base_a (default) []
-  
-
-Actual Testing
-==============
-
-basic output
-
-  $ hg topic
-     bar
-     baz
-   * foo
-     fuz
-
-quiet version
-
-  $ hg topic --quiet
-  bar
-  baz
-  foo
-  fuz
-
-verbose
-
-  $ hg topic --verbose
-     bar (on branch: default, 5 changesets, 1 troubled, 2 heads)
-     baz (on branch: default, 2 changesets, 2 behind)
-   * foo (on branch: lake, 2 changesets, ambiguous destination)
-     fuz (on branch: default, 3 changesets, 2 troubled, 1 behind)
-
-json
-
-  $ hg topic -T json
-  [
-   {
-    "active": false,
-    "topic": "bar"
-   },
-   {
-    "active": false,
-    "topic": "baz"
-   },
-   {
-    "active": true,
-    "topic": "foo"
-   },
-   {
-    "active": false,
-    "topic": "fuz"
-   }
-  ]
-
-json --verbose
-
-  $ hg topic -T json --verbose
-  [
-   {
-    "active": false,
-    "branches+": "default",
-    "changesetcount": 5,
-    "headcount": 2,
-    "topic": "bar",
-    "troubledcount": 1
-   },
-   {
-    "active": false,
-    "behindcount": 2,
-    "branches+": "default",
-    "changesetcount": 2,
-    "topic": "baz"
-   },
-   {
-    "active": true,
-    "behinderror": "ambiguous destination",
-    "branches+": "lake",
-    "changesetcount": 2,
-    "topic": "foo"
-   },
-   {
-    "active": false,
-    "behindcount": 1,
-    "branches+": "default",
-    "changesetcount": 3,
-    "topic": "fuz",
-    "troubledcount": 2
-   }
-  ]
-
-Also test this situation with 'hg stack'
-=======================================
-
-  $ hg stack bar
-  ### topic: bar (2 heads)
-  ### branch: default
-  t5: add bar_c
-  t2^ add bar_b (base)
-  t4$ add bar_e (unstable)
-  t3: bar1_d
-  t2: add bar_b
-  t1: add bar_a
-    ^ add base_e
-  $ hg stack baz
-  ### topic: baz
-  ### branch: default, 2 behind
-  t2: add baz_b
-  t1: add baz_a
-    ^ add base_c
-  $ hg stack foo
-  ### topic: foo
-  ### branch: lake, ambigious rebase destination
-  t2@ add foo_b (current)
-  t1: add foo_a
-    ^ add lake_a
-  $ hg stack fuz
-  ### topic: fuz
-  ### branch: default, 1 behind
-  t3$ add fuz_c (unstable)
-  t2$ add fuz_b (unstable)
-  t1: fuz1_a
-    ^ add base_d
--- a/tests/test-topic-stack.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +0,0 @@
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-
-Initial setup
-
-
-  $ cat << EOF >> $HGRCPATH
-  > [extensions]
-  > color =
-  > [ui]
-  > logtemplate = {rev} {branch} \{{get(namespaces, "topics")}} {phase} {desc|firstline}\n
-  > [experimental]
-  > evolution=createmarkers,exchange,allowunstable
-  > EOF
-
-  $ hg init main
-  $ cd main
-  $ hg topic other
-  $ echo aaa > aaa
-  $ hg add aaa
-  $ hg commit -m c_a
-  $ echo aaa > bbb
-  $ hg add bbb
-  $ hg commit -m c_b
-  $ hg topic foo
-  $ echo aaa > ccc
-  $ hg add ccc
-  $ hg commit -m c_c
-  $ echo aaa > ddd
-  $ hg add ddd
-  $ hg commit -m c_d
-  $ echo aaa > eee
-  $ hg add eee
-  $ hg commit -m c_e
-  $ echo aaa > fff
-  $ hg add fff
-  $ hg commit -m c_f
-  $ hg log -G
-  @  5 default {foo} draft c_f
-  |
-  o  4 default {foo} draft c_e
-  |
-  o  3 default {foo} draft c_d
-  |
-  o  2 default {foo} draft c_c
-  |
-  o  1 default {other} draft c_b
-  |
-  o  0 default {other} draft c_a
-  
-
-Check that topic without any parent does not crash --list
----------------------------------------------------------
-
-  $ hg up other
-  switching to topic other
-  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
-  $ hg topic --list
-  ### topic: other
-  ### branch: default
-  t2@ c_b (current)
-  t1: c_a
-  $ hg phase --public 'topic("other")'
-  $ hg up foo
-  switching to topic foo
-  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-Simple test
------------
-
-'hg stack' list all changeset in the topic
-
-  $ hg topic
-   * foo
-  $ hg stack
-  ### topic: foo
-  ### branch: default
-  t4@ c_f (current)
-  t3: c_e
-  t2: c_d
-  t1: c_c
-    ^ c_b
-  $ hg stack -Tjson | python -m json.tool
-  [
-      {
-          "isentry": true,
-          "topic.stack.desc": "c_f",
-          "topic.stack.index": 4,
-          "topic.stack.state": [
-              "current"
-          ],
-          "topic.stack.state.symbol": "@"
-      },
-      {
-          "isentry": true,
-          "topic.stack.desc": "c_e",
-          "topic.stack.index": 3,
-          "topic.stack.state": [
-              "clean"
-          ],
-          "topic.stack.state.symbol": ":"
-      },
-      {
-          "isentry": true,
-          "topic.stack.desc": "c_d",
-          "topic.stack.index": 2,
-          "topic.stack.state": [
-              "clean"
-          ],
-          "topic.stack.state.symbol": ":"
-      },
-      {
-          "isentry": true,
-          "topic.stack.desc": "c_c",
-          "topic.stack.index": 1,
-          "topic.stack.state": [
-              "clean"
-          ],
-          "topic.stack.state.symbol": ":"
-      },
-      {
-          "isentry": false,
-          "topic.stack.desc": "c_b",
-          "topic.stack.state": [
-              "base"
-          ],
-          "topic.stack.state.symbol": "^"
-      }
-  ]
-
-error case, nothing to list
-
-  $ hg topic --clear
-  $ hg stack
-  abort: no active topic to list
-  [255]
-
-Test "t#" reference
--------------------
-
-
-  $ hg up t2
-  abort: cannot resolve "t2": no active topic
-  [255]
-  $ hg topic foo
-  $ hg up t42
-  abort: cannot resolve "t42": topic "foo" has only 4 changesets
-  [255]
-  $ hg up t2
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg summary
-  parent: 3:e629654d7050 
-   c_d
-  branch: default
-  commit: (clean)
-  update: (current)
-  phases: 4 draft
-  topic:  foo
-
-Case with some of the topic unstable
-------------------------------------
-
-  $ echo bbb > ddd
-  $ hg commit --amend
-  $ hg log -G
-  @  7 default {foo} draft c_d
-  |
-  | o  5 default {foo} draft c_f
-  | |
-  | o  4 default {foo} draft c_e
-  | |
-  | x  3 default {foo} draft c_d
-  |/
-  o  2 default {foo} draft c_c
-  |
-  o  1 default {} public c_b
-  |
-  o  0 default {} public c_a
-  
-  $ hg topic --list
-  ### topic: foo
-  ### branch: default
-  t4$ c_f (unstable)
-  t3$ c_e (unstable)
-  t2@ c_d (current)
-  t1: c_c
-    ^ c_b
-  $ hg up t3
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic --list
-  ### topic: foo
-  ### branch: default
-  t4$ c_f (unstable)
-  t3@ c_e (current)
-  t2: c_d
-  t1: c_c
-    ^ c_b
-  $ hg topic --list --color=debug
-  [topic.stack.summary.topic|### topic: [topic.active|foo]]
-  [topic.stack.summary.branches|### branch: default]
-  [topic.stack.index topic.stack.index.unstable|t4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)]
-  [topic.stack.index topic.stack.index.current|t3][topic.stack.state topic.stack.state.current|@] [topic.stack.desc topic.stack.desc.current|c_e][topic.stack.state topic.stack.state.current| (current)]
-  [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
-  [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
-    [topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b]
-  $ hg up t2
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-Also test the revset:
-
-  $ hg log -r 'stack()'
-  2 default {foo} draft c_c
-  7 default {foo} draft c_d
-  4 default {foo} draft c_e
-  5 default {foo} draft c_f
-
-Case with multiple heads on the topic
--------------------------------------
-
-Make things linear again
-
-  $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
-  rebasing 4:0f9ac936c87d "c_e"
-  rebasing 5:6559e6d93aea "c_f"
-  $ hg log -G
-  o  9 default {foo} draft c_f
-  |
-  o  8 default {foo} draft c_e
-  |
-  @  7 default {foo} draft c_d
-  |
-  o  2 default {foo} draft c_c
-  |
-  o  1 default {} public c_b
-  |
-  o  0 default {} public c_a
-  
-
-
-Create the second branch
-
-  $ hg up 'desc(c_d)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo aaa > ggg
-  $ hg add ggg
-  $ hg commit -m c_g
-  $ echo aaa > hhh
-  $ hg add hhh
-  $ hg commit -m c_h
-  $ hg log -G
-  @  11 default {foo} draft c_h
-  |
-  o  10 default {foo} draft c_g
-  |
-  | o  9 default {foo} draft c_f
-  | |
-  | o  8 default {foo} draft c_e
-  |/
-  o  7 default {foo} draft c_d
-  |
-  o  2 default {foo} draft c_c
-  |
-  o  1 default {} public c_b
-  |
-  o  0 default {} public c_a
-  
-
-Test output
-
-  $ hg top -l
-  ### topic: foo (2 heads)
-  ### branch: default
-  t6: c_f
-  t5: c_e
-  t2^ c_d (base)
-  t4@ c_h (current)
-  t3: c_g
-  t2: c_d
-  t1: c_c
-    ^ c_b
-
-Case with multiple heads on the topic with unstability involved
----------------------------------------------------------------
-
-We amend the message to make sure the display base pick the right changeset
-
-  $ hg up 'desc(c_d)'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ echo ccc > ddd
-  $ hg commit --amend -m 'c_D' 
-  $ hg rebase -d . -s 'desc(c_g)'
-  rebasing 10:81264ae8a36a "c_g"
-  rebasing 11:fde5f5941642 "c_h"
-  $ hg log -G
-  o  15 default {foo} draft c_h
-  |
-  o  14 default {foo} draft c_g
-  |
-  @  13 default {foo} draft c_D
-  |
-  | o  9 default {foo} draft c_f
-  | |
-  | o  8 default {foo} draft c_e
-  | |
-  | x  7 default {foo} draft c_d
-  |/
-  o  2 default {foo} draft c_c
-  |
-  o  1 default {} public c_b
-  |
-  o  0 default {} public c_a
-  
-
-  $ hg topic --list
-  ### topic: foo (2 heads)
-  ### branch: default
-  t6$ c_f (unstable)
-  t5$ c_e (unstable)
-  t2^ c_D (base)
-  t4: c_h
-  t3: c_g
-  t2@ c_D (current)
-  t1: c_c
-    ^ c_b
--- a/tests/test-topic-tutorial.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-==============
-Topic Tutorial
-==============
-
-.. This test file is also supposed to be able to compile as a rest file.
-
-
-.. Some Setup::
-
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-  $ hg init server
-  $ cd server
-  $ cat >> .hg/hgrc << EOF
-  > [ui]
-  > user= Shopping Master
-  > EOF
-  $ cat >> shopping << EOF
-  > Spam
-  > Whizzo butter
-  > Albatross
-  > Rat (rather a lot)
-  > Jugged fish
-  > Blancmange
-  > Salmon mousse
-  > EOF
-  $ hg commit -A -m "Shopping list"
-  adding shopping
-  $ cd ..
-  $ hg clone server client
-  updating to branch default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ cat >> .hg/hgrc << EOF
-  > [ui]
-  > user= Tutorial User
-  > EOF
-
-Topic branches are lightweight branches which disappear when changes are
-finalized (move to the public phase). They can help users to organise and share
-their unfinished work.
-
-Topic Basics
-============
-
-Let's says we use Mercurial to manage our shopping list::
-
-  $ hg log --graph
-  @  changeset:   0:38da43f0a2ea
-     tag:         tip
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-
-We are about to do some edition to this list and would like to do them within
-a topic. Creating a new topic is done using the ``topic`` command::
-
-  $ hg topic food
-
-As for named branch, our topic is active but it does not contains any changesets yet::
-
-  $ hg topic
-   * food
-  $ hg summary
-  parent: 0:38da43f0a2ea tip
-   Shopping list
-  branch: default
-  commit: (clean)
-  update: (current)
-  topic:  food
-  $ hg log --graph
-  @  changeset:   0:38da43f0a2ea
-     tag:         tip
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-
-Our next commit will be part of the active topic::
-
-  $ cat >> shopping << EOF
-  > Egg
-  > Suggar
-  > Vinegar
-  > Oil
-  > EOF
-  $ hg commit -m "adding condiments"
-  $ hg log --graph --rev 'topic("food")'
-  @  changeset:   1:13900241408b
-  |  tag:         tip
-  ~  topic:       food
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     adding condiments
-  
-
-And future commit will be part of that topic too::
-
-  $ cat >> shopping << EOF
-  > Bananas
-  > Pear
-  > Apple
-  > EOF
-  $ hg commit -m "adding fruits"
-  $ hg log --graph --rev 'topic("food")'
-  @  changeset:   2:287de11b401f
-  |  tag:         tip
-  |  topic:       food
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding fruits
-  |
-  o  changeset:   1:13900241408b
-  |  topic:       food
-  ~  user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     adding condiments
-  
-
-We can get a compact view of the content of our topic using the ``stack`` command::
-
-  $ hg stack
-  ### topic: food
-  ### branch: default
-  t2@ adding fruits (current)
-  t1: adding condiments
-    ^ Shopping list
-
-The topic desactivate when we update away from it::
-
-  $ hg up default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic
-     food
-
-Note that ``default`` (name of the branch) now refers to the tipmost changeset of default without a topic::
-
-  $ hg log --graph
-  o  changeset:   2:287de11b401f
-  |  tag:         tip
-  |  topic:       food
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding fruits
-  |
-  o  changeset:   1:13900241408b
-  |  topic:       food
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding condiments
-  |
-  @  changeset:   0:38da43f0a2ea
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-
-And updating back to the topic reactivate it::
-
-  $ hg up food
-  switching to topic food
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic
-   * food
-
-The name used for updating does not affect the activation of the topic, updating to a revision part of a topic will activate it in all cases::
-
-  $ hg up default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg up --rev 'desc("condiments")'
-  switching to topic food
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic
-   * food
-
-.. server side activity::
-
-  $ cd ../server/
-  $ cat > shopping << EOF
-  > T-Shirt
-  > Trousers
-  > Spam
-  > Whizzo butter
-  > Albatross
-  > Rat (rather a lot)
-  > Jugged fish
-  > Blancmange
-  > Salmon mousse
-  > EOF
-  $ hg commit -A -m "Adding clothes"
-  $ cd ../client
-
-Topic will also affect rebase and merge destination. Let's pull the latest update from the main server::
-
-  $ hg pull
-  pulling from $TESTTMP/server (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  (run 'hg heads' to see heads)
-  $ hg log -G
-  o  changeset:   3:6104862e8b84
-  |  tag:         tip
-  |  parent:      0:38da43f0a2ea
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Adding clothes
-  |
-  | o  changeset:   2:287de11b401f
-  | |  topic:       food
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     adding fruits
-  | |
-  | @  changeset:   1:13900241408b
-  |/   topic:       food
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     adding condiments
-  |
-  o  changeset:   0:38da43f0a2ea
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-
-The topic head will not be considered when merge from the new head of the branch::
-
-  $ hg up default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg merge
-  abort: branch 'default' has one head - please merge with an explicit rev
-  (run 'hg heads' to see all heads)
-  [255]
-
-But the topic will see that branch head as a valid destination::
-
-  $ hg up food
-  switching to topic food
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg rebase
-  rebasing 1:13900241408b "adding condiments"
-  merging shopping
-  rebasing 2:287de11b401f "adding fruits"
-  merging shopping
-  $ hg log --graph
-  @  changeset:   5:2d50db8b5b4c
-  |  tag:         tip
-  |  topic:       food
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding fruits
-  |
-  o  changeset:   4:4011b46eeb33
-  |  topic:       food
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding condiments
-  |
-  o  changeset:   3:6104862e8b84
-  |  parent:      0:38da43f0a2ea
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Adding clothes
-  |
-  o  changeset:   0:38da43f0a2ea
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-
-The topic information will fade out when we publish the changesets::
-
-  $ hg topic
-     food
-  $ hg push
-  pushing to $TESTTMP/server (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 1 files
-  2 new obsolescence markers
-  $ hg topic
-  $ hg log --graph
-  @  changeset:   5:2d50db8b5b4c
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding fruits
-  |
-  o  changeset:   4:4011b46eeb33
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     adding condiments
-  |
-  o  changeset:   3:6104862e8b84
-  |  parent:      0:38da43f0a2ea
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Adding clothes
-  |
-  o  changeset:   0:38da43f0a2ea
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Shopping list
-  
-  $ hg up default
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-Working with Multiple Topics
-============================
-
-In the above example, topic are not bring much benefit since you only have one
-line of developement. Topic start to be more useful when you have to work on
-multiple features are the same time.
-
-We might go shopping in a hardware store in the same go, so let's add some
-tools to the shopping list withing a new topic::
-
-  $ hg topic tools
-  $ echo hammer >> shopping
-  $ hg ci -m 'Adding hammer'
-  $ echo saw >> shopping
-  $ hg ci -m 'Adding saw'
-  $ echo drill >> shopping
-  $ hg ci -m 'Adding drill'
-
-But are not sure to actually go in the hardward store, so in the meantime, we
-want to extend the list with drinks. We go back to the official default branch
-and start a new topic::
-
-  $ hg up default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic drinks
-  $ echo 'apple juice' >> shopping
-  $ hg ci -m 'Adding apple juice'
-  $ echo 'orange juice' >> shopping
-  $ hg ci -m 'Adding orange juice'
-
-We now have two topics::
-
-  $ hg topic
-   * drinks
-     tools
-
-The information ``hg stack`` command adapt to the active topic::
-
-  $ hg stack
-  ### topic: drinks
-  ### branch: default
-  t2@ Adding orange juice (current)
-  t1: Adding apple juice
-    ^ adding fruits
-  $ hg up tools
-  switching to topic tools
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg stack
-  ### topic: tools
-  ### branch: default
-  t3@ Adding drill (current)
-  t2: Adding saw
-  t1: Adding hammer
-    ^ adding fruits
-
-They are seen as independant branch by Mercurial. No rebase or merge betwen them will be attempted by default::
-
-  $ hg rebase
-  nothing to rebase
-  [1]
-
-.. server activity::
-
-  $ cd ../server
-  $ hg up
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ mv shopping foo
-  $ echo 'Coat' > shopping
-  $ cat foo >> shopping
-  $ hg ci -m 'add a coat'
-  $ echo 'Coat' > shopping
-  $ echo 'Shoes' >> shopping
-  $ cat foo >> shopping
-  $ hg rm foo
-  not removing foo: file is untracked
-  [1]
-  $ hg ci -m 'add a pair of shoes'
-  $ cd ../client
-
-Lets see what other people did in the mean time::
-
-  $ hg pull
-  pulling from $TESTTMP/server (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 1 files (+1 heads)
-  (run 'hg heads' to see heads)
-
-There is new changes! We can simply use ``hg rebase`` to update our changeset on top of the latest::
-
-  $ hg rebase
-  rebasing 6:183984ef46d1 "Adding hammer"
-  merging shopping
-  rebasing 7:cffff85af537 "Adding saw"
-  merging shopping
-  rebasing 8:34255b455dac "Adding drill"
-  merging shopping
-
-But what about the other topic? You can use 'hg topic --verbose' to see information about them::
-
-  $ hg topic --verbose
-     drinks (on branch: default, 2 changesets, 2 behind)
-     tools  (on branch: default, 3 changesets)
-
-The "2 behind" is telling you that there is 2 new changesets on the named branch of the topic. You need to merge or rebase to incorporate them.
-
-Pushing that topic would create a new heads will be prevented::
-
-  $ hg push --rev drinks
-  pushing to $TESTTMP/server (glob)
-  searching for changes
-  abort: push creates new remote head 70dfa201ed73!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-
-Even after a rebase Pushing all active topics at the same time will complains about the multiple heads it would create on that branch::
-
-  $ hg rebase -b drinks
-  rebasing 9:8dfa45bd5e0c "Adding apple juice"
-  merging shopping
-  rebasing 10:70dfa201ed73 "Adding orange juice"
-  merging shopping
-  switching to topic tools
-  $ hg push
-  pushing to $TESTTMP/server (glob)
-  searching for changes
-  abort: push creates new remote head 4cd7c1591a67!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-Publishing only one of them is allowed (as long as it does not create a new branch head has we just saw in the previous case)::
-
-  $ hg push -r drinks
-  pushing to $TESTTMP/server (glob)
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 1 files
-  2 new obsolescence markers
-
-The publishing topic has now vanished, and the one still draft is now marked as "behind"::
-
-  $ hg topic --verbose
-   * tools (on branch: default, 3 changesets, 2 behind)
-  $ hg stack
-  ### topic: tools
-  ### branch: default, 2 behind
-  t3@ Adding drill (current)
-  t2: Adding saw
-  t1: Adding hammer
-    ^ add a pair of shoes
-
--- a/tests/test-topic.t	Mon May 22 15:34:36 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,654 +0,0 @@
-  $ . "$TESTDIR/testlib/topic_setup.sh"
-
-  $ hg init pinky
-  $ cd pinky
-  $ cat <<EOF >> .hg/hgrc
-  > [phases]
-  > publish=false
-  > EOF
-  $ cat <<EOF >> $HGRCPATH
-  > [experimental]
-  > # disable the new graph style until we drop 3.7 support
-  > graphstyle.missing = |
-  > EOF
-
-  $ hg help topics
-  hg topics [TOPIC]
-  
-  View current topic, set current topic, or see all topics.
-  
-      The --verbose version of this command display various information on the
-      state of each topic.
-  
-  options:
-  
-      --clear        clear active topic if any
-      --change VALUE revset of existing revisions to change topic
-   -l --list         show the stack of changeset in the topic
-  
-  (some details hidden, use --verbose to show complete help)
-  $ hg topics
-
-Test topics interaction with evolution:
-
-  $ hg topics --config experimental.evolution=
-  $ hg topics --config experimental.evolution= --change . bob
-  abort: must have obsolete enabled to use --change
-  [255]
-
-Create some changes:
-
-  $ for x in alpha beta gamma delta ; do
-  >   echo file $x >> $x
-  >   hg addremove
-  >   hg ci -m "Add file $x"
-  > done
-  adding alpha
-  adding beta
-  adding gamma
-  adding delta
-
-Still no topics
-  $ hg topics
-
-Test commit flag and help text
-
-  $ echo stuff >> alpha
-  $ HGEDITOR=cat hg ci -t topicflag
-  
-  
-  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
-  HG: Leave message empty to abort commit.
-  HG: --
-  HG: user: test
-  HG: topic 'topicflag'
-  HG: branch 'default'
-  HG: changed alpha
-  abort: empty commit message
-  [255]
-  $ hg revert alpha
-  $ hg topic
-   * topicflag
-
-Make a topic
-  $ hg topic narf
-  $ hg topics
-   * narf
-  $ echo topic work >> alpha
-  $ hg ci -m 'start on narf'
-  $ hg co .^
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic fran
-  $ hg topics
-   * fran
-     narf
-  $ echo >> fran work >> beta
-  $ hg ci -m 'start on fran'
-  $ hg co narf
-  switching to topic narf
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg topic
-     fran
-   * narf
-  $ hg log -r . -T '{topics}\n'
-  narf
-  $ echo 'narf!!!' >> alpha
-  $ hg ci -m 'narf!'
-  $ hg log -G
-  @  changeset:   6:7c34953036d6
-  |  tag:         tip
-  |  topic:       narf
-  |  parent:      4:fb147b0b417c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     narf!
-  |
-  | o  changeset:   5:0469d521db49
-  | |  topic:       fran
-  | |  parent:      3:a53952faf762
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     start on fran
-  | |
-  o |  changeset:   4:fb147b0b417c
-  |/   topic:       narf
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     start on narf
-  |
-  o  changeset:   3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file delta
-  |
-  o  changeset:   2:15d1eb11d2fa
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file gamma
-  |
-  o  changeset:   1:c692ea2c9224
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file beta
-  |
-  o  changeset:   0:c2b7d2f7d14b
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Add file alpha
-  
-
-Exchanging of topics:
-  $ cd ..
-  $ hg init brain
-  $ hg -R pinky push -r 4 brain
-  pushing to brain
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 5 changesets with 5 changes to 4 files
-
-Export
-
-  $ hg -R pinky export
-  # HG changeset patch
-  # User test
-  # Date 0 0
-  #      Thu Jan 01 00:00:00 1970 +0000
-  # Node ID 7c34953036d6a36eae468c550d0592b89ee8bffc
-  # Parent  fb147b0b417c25ca15547cd945acf51cf8dcaf02
-  # EXP-Topic narf
-  narf!
-  
-  diff -r fb147b0b417c -r 7c34953036d6 alpha
-  --- a/alpha	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/alpha	Thu Jan 01 00:00:00 1970 +0000
-  @@ -1,2 +1,3 @@
-   file alpha
-   topic work
-  +narf!!!
-
-Import
-
-  $ hg -R pinky export > narf.diff
-  $ hg -R pinky --config extensions.strip= strip .
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  saved backup bundle to $TESTTMP/pinky/.hg/strip-backup/7c34953036d6-1ff3bae2-backup.hg (glob)
-  $ hg -R pinky import narf.diff
-  applying narf.diff
-  $ hg -R pinky log -r .
-  changeset:   6:7c34953036d6
-  tag:         tip
-  topic:       narf
-  parent:      4:fb147b0b417c
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     narf!
-  
-Now that we've pushed to brain, the work done on narf is no longer a
-draft, so we won't see that topic name anymore:
-
-  $ hg log -R pinky -G
-  @  changeset:   6:7c34953036d6
-  |  tag:         tip
-  |  topic:       narf
-  |  parent:      4:fb147b0b417c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     narf!
-  |
-  | o  changeset:   5:0469d521db49
-  | |  topic:       fran
-  | |  parent:      3:a53952faf762
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     start on fran
-  | |
-  o |  changeset:   4:fb147b0b417c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     start on narf
-  |
-  o  changeset:   3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file delta
-  |
-  o  changeset:   2:15d1eb11d2fa
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file gamma
-  |
-  o  changeset:   1:c692ea2c9224
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file beta
-  |
-  o  changeset:   0:c2b7d2f7d14b
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Add file alpha
-  
-  $ cd brain
-  $ hg co tip
-  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-Because the change is public, we won't inherit the topic from narf.
-
-  $ hg topic
-  $ echo what >> alpha
-  $ hg topic query
-  $ hg ci -m 'what is narf, pinky?'
-  $ hg log -Gl2
-  @  changeset:   5:c01515cfc331
-  |  tag:         tip
-  |  topic:       query
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     what is narf, pinky?
-  |
-  o  changeset:   4:fb147b0b417c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on narf
-  |
-  $ hg push -f ../pinky -r query
-  pushing to ../pinky
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  $ hg -R ../pinky log -Gl 4
-  o  changeset:   7:c01515cfc331
-  |  tag:         tip
-  |  topic:       query
-  |  parent:      4:fb147b0b417c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     what is narf, pinky?
-  |
-  | @  changeset:   6:7c34953036d6
-  |/   topic:       narf
-  |    parent:      4:fb147b0b417c
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     narf!
-  |
-  | o  changeset:   5:0469d521db49
-  | |  topic:       fran
-  | |  parent:      3:a53952faf762
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     start on fran
-  | |
-  o |  changeset:   4:fb147b0b417c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     start on narf
-  |
-  $ hg topics
-   * query
-  $ cd ../pinky
-  $ hg co query
-  switching to topic query
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo answer >> alpha
-  $ hg ci -m 'Narf is like `zort` or `poit`!'
-  $ hg merge narf
-  merging alpha
-  warning: conflicts while merging alpha! (edit, then use 'hg resolve --mark')
-  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
-  [1]
-  $ hg revert -r narf alpha
-  $ hg resolve -m alpha
-  (no more unresolved files)
-  $ hg topic narf
-  $ hg ci -m 'Finish narf'
-  $ hg topics
-     fran
-   * narf
-     query
-  $ hg debugnamecomplete # branch:topic here is a buggy side effect
-  default
-  default:fran
-  default:narf
-  default:query
-  fran
-  narf
-  query
-  tip
-  $ hg phase --public narf
-
-POSSIBLE BUG: narf topic stays alive even though we just made all
-narf commits public:
-
-  $ hg topics
-     fran
-   * narf
-  $ hg log -Gl 6
-  @    changeset:   9:ae074045b7a7
-  |\   tag:         tip
-  | |  parent:      8:54c943c1c167
-  | |  parent:      6:7c34953036d6
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     Finish narf
-  | |
-  | o  changeset:   8:54c943c1c167
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     Narf is like `zort` or `poit`!
-  | |
-  | o  changeset:   7:c01515cfc331
-  | |  parent:      4:fb147b0b417c
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     what is narf, pinky?
-  | |
-  o |  changeset:   6:7c34953036d6
-  |/   parent:      4:fb147b0b417c
-  |    user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     narf!
-  |
-  | o  changeset:   5:0469d521db49
-  | |  topic:       fran
-  | |  parent:      3:a53952faf762
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     start on fran
-  | |
-  o |  changeset:   4:fb147b0b417c
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     start on narf
-  |
-  $ cd ../brain
-  $ hg topics
-   * query
-  $ hg pull ../pinky -r narf
-  pulling from ../pinky
-  abort: unknown revision 'narf'!
-  [255]
-  $ hg pull ../pinky -r default
-  pulling from ../pinky
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 3 changesets with 3 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg topics
-   * query
-
-We can pull in the draft-phase change and we get the new topic
-
-  $ hg pull ../pinky
-  pulling from ../pinky
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  (run 'hg heads' to see heads)
-  $ hg topics
-     fran
-   * query
-  $ hg log -Gr 'draft()'
-  o  changeset:   9:0469d521db49
-  |  tag:         tip
-  |  topic:       fran
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-
-query is not an open topic, so when we clear the current topic it'll
-disappear:
-
-  $ hg topics --clear
-  $ hg topics
-     fran
-
---clear when we don't have an active topic isn't an error:
-
-  $ hg topics --clear
-
-Topic revset
-  $ hg log -r 'topic()' -G
-  o  changeset:   9:0469d521db49
-  |  tag:         tip
-  |  topic:       fran
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-  $ hg log -r 'not topic()' -G
-  o    changeset:   8:ae074045b7a7
-  |\   parent:      7:54c943c1c167
-  | |  parent:      6:7c34953036d6
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     Finish narf
-  | |
-  | o  changeset:   7:54c943c1c167
-  | |  parent:      5:c01515cfc331
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     Narf is like `zort` or `poit`!
-  | |
-  o |  changeset:   6:7c34953036d6
-  | |  parent:      4:fb147b0b417c
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     narf!
-  | |
-  | @  changeset:   5:c01515cfc331
-  |/   user:        test
-  |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    summary:     what is narf, pinky?
-  |
-  o  changeset:   4:fb147b0b417c
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on narf
-  |
-  o  changeset:   3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file delta
-  |
-  o  changeset:   2:15d1eb11d2fa
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file gamma
-  |
-  o  changeset:   1:c692ea2c9224
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     Add file beta
-  |
-  o  changeset:   0:c2b7d2f7d14b
-     user:        test
-     date:        Thu Jan 01 00:00:00 1970 +0000
-     summary:     Add file alpha
-  
-No matches because narf is already closed:
-  $ hg log -r 'topic(narf)' -G
-This regexp should match the topic `fran`:
-  $ hg log -r 'topic("re:.ra.")' -G
-  o  changeset:   9:0469d521db49
-  |  tag:         tip
-  |  topic:       fran
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-Exact match on fran:
-  $ hg log -r 'topic(fran)' -G
-  o  changeset:   9:0469d521db49
-  |  tag:         tip
-  |  topic:       fran
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-
-Match current topic:
-  $ hg topic
-     fran
-  $ hg log -r 'topic(.)'
-(no output is expected)
-  $ hg co fran
-  switching to topic fran
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg log -r 'topic(.)'
-  changeset:   9:0469d521db49
-  tag:         tip
-  topic:       fran
-  parent:      3:a53952faf762
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     start on fran
-  
-
-Deactivate the topic.
-  $ hg topics
-   * fran
-  $ hg topics --clear
-  $ echo fran? >> beta
-  $ hg ci -m 'fran?'
-  created new head
-  $ hg log -Gr 'draft()'
-  @  changeset:   10:4073470c35e1
-  |  tag:         tip
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     fran?
-  |
-  o  changeset:   9:0469d521db49
-  |  topic:       fran
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-  $ hg topics
-     fran
-Changing topic fails if we don't give a topic
-  $ hg topic --change 9
-  abort: changing topic requires a topic name or --clear
-  [255]
-
-Can't change topic of a public change
-  $ hg topic --change 1:: --clear
-  abort: can't change topic of a public change
-  [255]
-
-Can clear topics
-  $ hg topic --change 9 --clear
-  changed topic on 1 changes
-  please run hg evolve --rev "not topic()" now
-  $ hg log -Gr 'draft() and not obsolete()'
-  o  changeset:   11:783930e1d79e
-  |  tag:         tip
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-  | @  changeset:   10:4073470c35e1
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     fran?
-  | |
-
-Normally you'd do this with evolve, but we'll use rebase to avoid
-bonus deps in the testsuite.
-
-  $ hg rebase -d tip -s .
-  rebasing 10:4073470c35e1 "fran?"
-
-Can add a topic to an existing change
-  $ hg topic --change 11 wat
-  changed topic on 1 changes
-  please run hg evolve --rev "topic(wat)" now
-  $ hg log -Gr 'draft() and not obsolete()'
-  o  changeset:   13:d91cd8fd490e
-  |  tag:         tip
-  |  topic:       wat
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-  | @  changeset:   12:d9e32f4c4806
-  | |  user:        test
-  | |  date:        Thu Jan 01 00:00:00 1970 +0000
-  | |  summary:     fran?
-  | |
-
-Normally you'd do this with evolve, but we'll use rebase to avoid
-bonus deps in the testsuite.
-
-  $ hg rebase -d tip -s .
-  rebasing 12:d9e32f4c4806 "fran?"
-
-  $ hg log -Gr 'draft()'
-  @  changeset:   14:cf24ad8bbef5
-  |  tag:         tip
-  |  topic:       wat
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     fran?
-  |
-  o  changeset:   13:d91cd8fd490e
-  |  topic:       wat
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-
-Amend a topic
-
-  $ hg topic watwat
-  $ hg ci --amend
-  $ hg log -Gr 'draft()'
-  @  changeset:   16:893ffcf66c1f
-  |  tag:         tip
-  |  topic:       watwat
-  |  parent:      13:d91cd8fd490e
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     fran?
-  |
-  o  changeset:   13:d91cd8fd490e
-  |  topic:       wat
-  |  parent:      3:a53952faf762
-  |  user:        test
-  |  date:        Thu Jan 01 00:00:00 1970 +0000
-  |  summary:     start on fran
-  |
-
-Clear and amend:
-
-  $ hg topic --clear
-  $ hg ci --amend
-  $ hg log -r .
-  changeset:   18:a13639e22b65
-  tag:         tip
-  parent:      13:d91cd8fd490e
-  user:        test
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     fran?
-  
-Readding the same topic with topic --change should work:
-  $ hg topic --change . watwat
-  changed topic on 1 changes