merge with stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 26 May 2017 16:12:07 +0200
changeset 2483 db565cc05987
parent 2480 a147ea7fb579 (diff)
parent 2482 c0bfddf89c62 (current diff)
child 2484 262d684851dc
merge with stable
README
tests/test-evolve-obshistory.t
tests/test-evolve.t
--- a/README	Fri May 26 15:57:17 2017 +0200
+++ b/README	Fri May 26 16:12:07 2017 +0200
@@ -112,6 +112,11 @@
 Changelog
 =========
 
+6.3.0 - in progress
+-------------------
+
+ - olog: add an 'obslog' alias
+
 6.2.2 - in progress
 -------------------
 
--- a/hgext3rd/evolve/debugcmd.py	Fri May 26 15:57:17 2017 +0200
+++ b/hgext3rd/evolve/debugcmd.py	Fri May 26 16:12:07 2017 +0200
@@ -10,7 +10,10 @@
 #  * We could have the same code in core as `hg debugobsolete --stat`,
 #  * We probably want a way for the extension to hook in for extra data.
 
-from mercurial import node
+from mercurial import (
+    obsolete,
+    node,
+)
 
 from mercurial.i18n import _
 
@@ -41,7 +44,8 @@
     store = repo.obsstore
     unfi = repo.unfiltered()
     nm = unfi.changelog.nodemap
-    ui.write(_('markers total:              %9i\n') % len(store._all))
+    nbmarkers = len(store._all)
+    ui.write(_('markers total:              %9i\n') % nbmarkers)
     sucscount = [0, 0, 0, 0]
     known = 0
     parentsdata = 0
@@ -51,6 +55,8 @@
     clustersmap = {}
     # same data using parent information
     pclustersmap = {}
+    size_v0 = []
+    size_v1 = []
     for mark in store:
         if mark[0] in nm:
             known += 1
@@ -72,6 +78,8 @@
         # same with parent data
         nodes.update(parents)
         _updateclustermap(nodes, mark, pclustersmap)
+        size_v0.append(len(obsolete._fm0encodeonemarker(mark)))
+        size_v1.append(len(obsolete._fm1encodeonemarker(mark)))
 
     # freezing the result
     for c in clustersmap.values():
@@ -95,6 +103,27 @@
     for key in sorted(metakeys):
         ui.write(('    %15s:        %9i\n' % (key, metakeys[key])))
 
+    size_v0.sort()
+    size_v1.sort()
+    if size_v0:
+        ui.write('marker size:\n')
+        # format v1
+        ui.write('    format v1:\n')
+        ui.write(('        smallest length:    %9i\n' % size_v1[0]))
+        ui.write(('        longer length:      %9i\n' % size_v1[-1]))
+        median = size_v1[nbmarkers // 2]
+        ui.write(('        median length:      %9i\n' % median))
+        mean = sum(size_v1) // nbmarkers
+        ui.write(('        mean length:        %9i\n' % mean))
+        # format v0
+        ui.write('    format v0:\n')
+        ui.write(('        smallest length:    %9i\n' % size_v0[0]))
+        ui.write(('        longer length:      %9i\n' % size_v0[-1]))
+        median = size_v0[nbmarkers // 2]
+        ui.write(('        median length:      %9i\n' % median))
+        mean = sum(size_v0) // nbmarkers
+        ui.write(('        mean length:        %9i\n' % mean))
+
     allclusters = list(set(clustersmap.values()))
     allclusters.sort(key=lambda x: len(x[1]))
     ui.write(('disconnected clusters:      %9i\n' % len(allclusters)))
--- a/hgext3rd/evolve/metadata.py	Fri May 26 15:57:17 2017 +0200
+++ b/hgext3rd/evolve/metadata.py	Fri May 26 16:12:07 2017 +0200
@@ -5,7 +5,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-__version__ = '6.2.2.dev'
+__version__ = '6.3.0.dev'
 testedwith = '3.8.4 3.9.2 4.0.2 4.1.2 4.2'
 minimumhgversion = '3.8'
 buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obshistory.py	Fri May 26 15:57:17 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri May 26 16:12:07 2017 +0200
@@ -12,6 +12,7 @@
     commands,
     error,
     graphmod,
+    obsolete,
     node as nodemod,
     scmutil,
 )
@@ -25,7 +26,7 @@
 eh = exthelper.exthelper()
 
 @eh.command(
-    'olog',
+    'obslog|olog',
     [('G', 'graph', True, _("show the revision DAG")),
      ('r', 'rev', [], _('show the specified revision or revset'), _('REV'))
     ] + commands.formatteropts,
@@ -337,6 +338,30 @@
 
     fm.write('debugobshistory.verb', '%s', verb,
              label="evolve.verb")
+
+    effectflag = metadata.get('ef1')
+    if effectflag is not None:
+        try:
+            effectflag = int(effectflag)
+        except ValueError:
+            effectflag = None
+    if effectflag:
+        effect = []
+
+        # XXX should be a dict
+        if effectflag & DESCCHANGED:
+            effect.append('description')
+        if effectflag & METACHANGED:
+            effect.append('meta')
+        if effectflag & PARENTCHANGED:
+            effect.append('parent')
+        if effectflag & DIFFCHANGED:
+            effect.append('content')
+
+        if effect:
+            fmteffect = fm.formatlist(effect, 'debugobshistory.effect', sep=', ')
+            fm.write('debugobshistory.effect', '(%s)', fmteffect)
+
     fm.plain(' by ')
 
     fm.write('debugobshistory.marker_user', '%s', metadata['user'],
@@ -355,3 +380,99 @@
                  label="evolve.node")
 
     fm.plain("\n")
+
+# logic around storing and using effect flags
+DESCCHANGED = 1 << 0 # action changed the description
+METACHANGED = 1 << 1 # action change the meta (user, date, branch, etc...)
+PARENTCHANGED = 1 << 2 # action change the parent
+DIFFCHANGED = 1 << 3 # action change diff introduced by the changeset
+
+def geteffectflag(relation):
+    """compute the effect flag by comparing the source and destination"""
+    effects = 0
+
+    source = relation[0]
+
+    for changectx in relation[1]:
+        # Check if description has changed
+        if changectx.description() != source.description():
+            effects |= DESCCHANGED
+
+        # Check if known meta has changed
+        if (changectx.user() != source.user()
+                or changectx.date() != source.date()
+                or changectx.branch() != source.branch()):
+            effects |= METACHANGED
+
+        # Check if at least one of the parent has changes
+        if changectx.parents() != source.parents():
+            effects |= PARENTCHANGED
+
+        if not _cmpdiff(source, changectx):
+            effects |= DIFFCHANGED
+
+    return effects
+
+def _getdiffline(iterdiff):
+    """return a cleaned up line"""
+    try:
+        line = iterdiff.next()
+    except StopIteration:
+        return None
+    return line
+
+def _cmpdiff(leftctx, rightctx):
+    """return True if both ctx introduce the "same diff"
+
+    This is a first and basic implementation, with many shortcoming.
+    """
+    leftdiff = leftctx.diff(git=1)
+    rightdiff = rightctx.diff(git=1)
+    left, right = (0, 0)
+    while None not in (left, right):
+        left = _getdiffline(leftdiff)
+        right = _getdiffline(rightdiff)
+        if left != right:
+            return False
+    return True
+
+@eh.wrapfunction(obsolete, 'createmarkers')
+def createmarkerswithbits(orig, repo, relations, flag=0, date=None,
+                          metadata=None, **kwargs):
+    """compute 'effect-flag' and augment the created markers
+
+    Wrap obsolete.createmarker in order to compute the effect of each
+    relationship and store them as flag in the metadata.
+
+    While we experiment, we store flag in a metadata field. This field is
+    "versionned" to easilly allow moving to other meaning for flags.
+
+    The comparison of description or other infos just before creating the obs
+    marker might induce overhead in some cases. However it is a good place to
+    start since it automatically makes all markers creation recording more
+    meaningful data. In the future, we can introduce way for commands to
+    provide precomputed effect to avoid the overhead.
+    """
+    if not repo.ui.configbool('experimental', 'evolution.effect-flags', False):
+        return orig(repo, relations, flag, date, metadata, **kwargs)
+    if metadata is None:
+        metadata = {}
+    tr = repo.transaction('add-obsolescence-marker')
+    try:
+        for r in relations:
+            # Compute the effect flag for each obsmarker
+            effect = geteffectflag(r)
+
+            # Copy the metadata in order to add them, we copy because the
+            # effect flag might be different per relation
+            m = metadata.copy()
+            # we store the effect even if "0". This disctinct markers created
+            # without the feature with markers recording a no-op.
+            m['ef1'] = "%d" % effect
+
+            # And call obsolete.createmarkers for creating the obsmarker for real
+            orig(repo, [r], flag, date, m, **kwargs)
+
+        tr.close()
+    finally:
+        tr.release()
--- a/tests/test-discovery-obshashrange.t	Fri May 26 15:57:17 2017 +0200
+++ b/tests/test-discovery-obshashrange.t	Fri May 26 16:12:07 2017 +0200
@@ -34,24 +34,10 @@
   * @0000000000000000000000000000000000000000 (*)> serve --stdio (glob)
   * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 0o) (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (8r, 0o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 0o) (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (8r, 0o) (glob)
   * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> blackbox (glob)
   $ rm .hg/blackbox.log
@@ -168,11 +154,11 @@
   $ rm ../server/.hg/blackbox.log
   $ hg blackbox
   * @0000000000000000000000000000000000000000 (*)> pull --rev 4 (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
   * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (5r, 3o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (5r, 3o) (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated base branch cache in *.???? seconds (glob)
+  * @0000000000000000000000000000000000000000 (*)> wrote base branch cache with 1 labels and 1 nodes (glob)
   * @0000000000000000000000000000000000000000 (*)> 5 incoming changes - new heads: bebd167eb94d (glob)
   * @0000000000000000000000000000000000000000 (*)> pull --rev 4 exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> blackbox (glob)
@@ -250,12 +236,11 @@
   received listkey for "phases": 58 bytes
   $ hg -R ../server blackbox
   * @0000000000000000000000000000000000000000 (*)> serve --stdio (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob)
+  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob)
-  * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @0000000000000000000000000000000000000000 (*)> 1 incoming changes - new heads: 45f8b879de92 (glob)
   * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob)
   * @0000000000000000000000000000000000000000 (*)> blackbox (glob)
@@ -312,10 +297,10 @@
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> add foo (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> add foo exited 0 after *.?? seconds (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> commit -m foo (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated served branch cache in *.???? seconds (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote served branch cache with 1 labels and 1 nodes (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 1 nodes (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)
@@ -344,7 +329,7 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 22222222222222222bbbbbbbbbbbbb2222222222 2dc09a01254db841290af0538aa52f6f52c776e3 exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push exited True after *.?? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push exited 1 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob)
   $ rm .hg/blackbox.log
   $ hg debugobsolete | sort
@@ -423,13 +408,12 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (2r, 0o) (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (2r, 3o) (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 3o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (2r, 3o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 2 incoming changes - new heads: f69452c5b1af (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob)
@@ -569,12 +553,11 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob)
+  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback (glob)
@@ -619,11 +602,8 @@
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-obscache cache reset (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (9r, 12o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob)
-  * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob)
   * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob)
@@ -745,11 +725,11 @@
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G exited 0 after *.?? seconds (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated stablerange cache in *.???? seconds (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated served branch cache in *.???? seconds (glob)
-  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated base branch cache in *.???? seconds (glob)
+  * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull exited 0 after *.?? seconds (glob)
   * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G (glob)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-cycles.t	Fri May 26 16:12:07 2017 +0200
@@ -0,0 +1,364 @@
+Test that evolve related algorithms don't crash on obs markers cycles
+
+Global setup
+============
+
+  $ . $TESTDIR/testlib/common.sh
+  $ cat >> $HGRCPATH <<EOF
+  > [ui]
+  > interactive = true
+  > [phases]
+  > publish=False
+  > [extensions]
+  > evolve =
+  > EOF
+
+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 obslog "desc(A)" --hidden
+  @  2a34000d3544 (1) A
+  |    rewritten by test (*) as c473644ee0e9 (glob)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten by test (*) as 2a34000d3544 (glob)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten by test (*) as a8df460dbbfe (glob)
+  |
+
+  $ hg obslog "desc(B)" --hidden
+  @  2a34000d3544 (1) A
+  |    rewritten by test (*) as c473644ee0e9 (glob)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten by test (*) as 2a34000d3544 (glob)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten by test (*) as a8df460dbbfe (glob)
+  |
+
+  $ hg obslog "desc(C)" --hidden
+  @  2a34000d3544 (1) A
+  |    rewritten by test (*) as c473644ee0e9 (glob)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten by test (*) as 2a34000d3544 (glob)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten by test (*) 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 obslog "desc(D)" --hidden
+  x  0da815c333f6 (5) E
+  |    rewritten by test (*) as d9f908fde1a1 (glob)
+  |
+  @    868d2e0eb19c (4) D
+  |\     rewritten by test (*) as 0da815c333f6 (glob)
+  | |
+  | x  d9f908fde1a1 (6) F
+  | |    rewritten by test (*) as 868d2e0eb19c (glob)
+  | |
+  +---x  2a34000d3544 (1) A
+  | |      rewritten by test (*) as c473644ee0e9 (glob)
+  | |
+  x |  a8df460dbbfe (3) C
+  | |    rewritten by test (*) as 2a34000d3544, 868d2e0eb19c (glob)
+  | |
+  x |  c473644ee0e9 (2) B
+  | |    rewritten by test (*) as a8df460dbbfe (glob)
+  | |
+
+Check the json output is valid in this case
+
+  $ hg obslog "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"
+      }
+  ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-effectflags.t	Fri May 26 16:12:07 2017 +0200
@@ -0,0 +1,110 @@
+Test the 'effect-flags' feature
+
+Global setup
+============
+
+  $ . $TESTDIR/testlib/common.sh
+  $ cat >> $HGRCPATH <<EOF
+  > [ui]
+  > interactive = true
+  > [phases]
+  > publish=False
+  > [extensions]
+  > evolve =
+  > rebase =
+  > [experimental]
+  > evolution.effect-flags = 1
+  > EOF
+
+  $ hg init $TESTTMP/effect-flags
+  $ cd $TESTTMP/effect-flags
+  $ mkcommit ROOT
+
+amend touching the description only
+-----------------------------------
+
+  $ mkcommit A0
+  $ hg amend -m "A1"
+
+check result
+
+  $ hg debugobsolete --rev .
+  471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (*) {'ef1': '1', 'user': 'test'} (glob)
+  $ hg obslog .
+  @  fdf9bde5129a (2) A1
+  |
+  x  471f378eab4c (1) A0
+       rewritten(description) by test (*) as fdf9bde5129a (glob)
+  
+
+amend touching the metadata only
+--------------------------------
+
+  $ mkcommit B0
+  $ hg amend -u "bob <bob@bob.com>"
+
+check result
+
+  $ hg debugobsolete --rev .
+  ef4a313b1e0ade55718395d80e6b88c5ccd875eb 5485c92d34330dac9d7a63dc07e1e3373835b964 0 (*) {'ef1': '2', 'user': 'test'} (glob)
+  $ hg obslog .
+  @  5485c92d3433 (4) B0
+  |
+  x  ef4a313b1e0a (3) B0
+       rewritten(meta) by test (*) as 5485c92d3433 (glob)
+  
+
+rebase (parents change)
+-----------------------
+
+  $ mkcommit C0
+  $ mkcommit D0
+  $ hg rebase -r . -d 'desc(B0)'
+  rebasing 6:2ee0a31bd600 "D0" (tip)
+
+check result
+
+  $ hg debugobsolete --rev .
+  2ee0a31bd600ca999a5e6e69bfdfde3f9c78a6f9 131ac3eecd92fb2dfd2fc59bb5e0b8efbe9e9201 0 (*) {'ef1': '4', 'user': 'test'} (glob)
+  $ hg obslog .
+  @  131ac3eecd92 (7) D0
+  |
+  x  2ee0a31bd600 (6) D0
+       rewritten(parent) by test (*) as 131ac3eecd92 (glob)
+  
+
+amend touching the diff
+-----------------------
+
+  $ mkcommit E0
+  $ echo 42 >> E0
+  $ hg amend
+
+check result
+
+  $ hg debugobsolete --rev .
+  5734caf1004261ffc2ed05763b82bf9d75ba3788 0 {f75604747b4fd2dfebe7f48c6e629aea15e3b237} (*) {'ef1': '0', 'user': 'test'} (glob)
+  f75604747b4fd2dfebe7f48c6e629aea15e3b237 bed7e49faeb8ae06649b547a755d50f5bb0be220 0 (*) {'ef1': '8', 'user': 'test'} (glob)
+  $ hg obslog .
+  @  bed7e49faeb8 (10) E0
+  |
+  x  f75604747b4f (8) E0
+       rewritten(content) by test (*) as bed7e49faeb8 (glob)
+  
+
+amend with multiple effect (desc and meta)
+-------------------------------------------
+
+  $ mkcommit F0
+  $ hg amend -m F1 -u "bob <bob@bob.com>"
+
+check result
+
+  $ hg debugobsolete --rev .
+  713ccc39944e10bd35b7f6eaed3eef0eab60e50b 7d0186621c5ba1b0f7c5c99668d43273cb44c2fe 0 (*) {'ef1': '3', 'user': 'test'} (glob)
+  $ hg obslog .
+  @  7d0186621c5b (12) F1
+  |
+  x  713ccc39944e (11) F0
+       rewritten(description, meta) by test (*) as 7d0186621c5b (glob)
+  
--- a/tests/test-evolve-obshistory.t	Fri May 26 15:57:17 2017 +0200
+++ b/tests/test-evolve-obshistory.t	Fri May 26 16:12:07 2017 +0200
@@ -53,13 +53,13 @@
   
 Actual test
 -----------
-  $ hg olog 4ae3a4151de9
+  $ hg obslog 4ae3a4151de9
   @  4ae3a4151de9 (3) A1
   |
   x  471f378eab4c (1) A0
        rewritten by test (*) as 4ae3a4151de9 (glob)
   
-  $ hg olog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
+  $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -86,11 +86,11 @@
           "debugobshistory.shortdescription": "A0"
       }
   ]
-  $ hg olog --hidden 471f378eab4c
+  $ hg obslog --hidden 471f378eab4c
   x  471f378eab4c (1) A0
        rewritten by test (*) as 4ae3a4151de9 (glob)
   
-  $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [
@@ -173,11 +173,11 @@
 Actual test
 -----------
 
-  $ hg olog 'desc(B0)' --hidden
+  $ hg obslog 'desc(B0)' --hidden
   x  0dec01379d3b (2) B0
        pruned by test (*) (glob)
   
-  $ hg olog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [
@@ -195,10 +195,10 @@
           "debugobshistory.shortdescription": "B0"
       }
   ]
-  $ hg olog 'desc(A0)'
+  $ hg obslog 'desc(A0)'
   @  471f378eab4c (1) A0
   
-  $ hg olog 'desc(A0)' --no-graph -Tjson | python -m json.tool
+  $ hg obslog 'desc(A0)' --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -306,11 +306,11 @@
 -----------
 
 Check that debugobshistory on splitted commit show both targets
-  $ hg olog 471597cad322 --hidden
+  $ hg obslog 471597cad322 --hidden
   x  471597cad322 (1) A0
        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
   
-  $ hg olog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [
@@ -334,7 +334,7 @@
   ]
 Check that debugobshistory on the first successor after split show
 the revision plus the splitted one
-  $ hg olog 337fec4d2edc
+  $ hg obslog 337fec4d2edc
   o  337fec4d2edc (2) A0
   |
   x  471597cad322 (1) A0
@@ -342,7 +342,7 @@
   
 Check that debugobshistory on the second successor after split show
 the revision plus the splitted one
-  $ hg olog f257fde29c7a
+  $ hg obslog f257fde29c7a
   @  f257fde29c7a (3) A0
   |
   x  471597cad322 (1) A0
@@ -350,7 +350,7 @@
   
 Check that debugobshistory on both successors after split show
 a coherent graph
-  $ hg olog 'f257fde29c7a+337fec4d2edc'
+  $ hg obslog 'f257fde29c7a+337fec4d2edc'
   o  337fec4d2edc (2) A0
   |
   | @  f257fde29c7a (3) A0
@@ -520,11 +520,11 @@
 Actual test
 -----------
 
-  $ hg olog de7290d8b885 --hidden
+  $ hg obslog de7290d8b885 --hidden
   x  de7290d8b885 (1) A0
        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   
-  $ hg olog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [
@@ -548,13 +548,13 @@
           "debugobshistory.shortdescription": "A0"
       }
   ]
-  $ hg olog c7f044602e9b
+  $ hg obslog c7f044602e9b
   @  c7f044602e9b (5) A0
   |
   x  de7290d8b885 (1) A0
        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   
-  $ hg olog c7f044602e9b --no-graph -Tjson | python -m json.tool
+  $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -585,7 +585,7 @@
       }
   ]
 Check that debugobshistory on all heads show a coherent graph
-  $ hg olog 2::5
+  $ hg obslog 2::5
   o  1ae8bc733a14 (4) A0
   |
   | o  337fec4d2edc (2) A0
@@ -665,19 +665,19 @@
 
 Check that debugobshistory on the first folded revision show only
 the revision with the target
-  $ hg olog --hidden 471f378eab4c
+  $ hg obslog --hidden 471f378eab4c
   x  471f378eab4c (1) A0
        rewritten by test (*) as eb5a0daa2192 (glob)
   
 Check that debugobshistory on the second folded revision show only
 the revision with the target
-  $ hg olog --hidden 0dec01379d3b
+  $ hg obslog --hidden 0dec01379d3b
   x  0dec01379d3b (2) B0
        rewritten by test (*) as eb5a0daa2192 (glob)
   
 Check that debugobshistory on the successor revision show a coherent
 graph
-  $ hg olog eb5a0daa2192
+  $ hg obslog eb5a0daa2192
   @    eb5a0daa2192 (3) C0
   |\
   x |  0dec01379d3b (2) B0
@@ -686,7 +686,7 @@
   x  471f378eab4c (1) A0
        rewritten by test (*) as eb5a0daa2192 (glob)
   
-  $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -815,12 +815,12 @@
 -----------
 
 Check that debugobshistory on the divergent revision show both destinations
-  $ hg olog --hidden 471f378eab4c
+  $ hg obslog --hidden 471f378eab4c
   x  471f378eab4c (1) A0
        rewritten by test (*) as 65b757b745b9 (glob)
        rewritten by test (*) as fdf9bde5129a (glob)
   
-  $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
+  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [
@@ -854,7 +854,7 @@
   ]
 Check that debugobshistory on the first diverged revision show the revision
 and the diverent one
-  $ hg olog fdf9bde5129a
+  $ hg obslog fdf9bde5129a
   o  fdf9bde5129a (2) A1
   |
   x  471f378eab4c (1) A0
@@ -863,7 +863,7 @@
   
 Check that debugobshistory on the second diverged revision show the revision
 and the diverent one
-  $ hg olog 65b757b745b9
+  $ hg obslog 65b757b745b9
   @  65b757b745b9 (3) A2
   |
   x  471f378eab4c (1) A0
@@ -872,7 +872,7 @@
   
 Check that debugobshistory on the both diverged revision show a coherent
 graph
-  $ hg olog '65b757b745b9+fdf9bde5129a'
+  $ hg obslog '65b757b745b9+fdf9bde5129a'
   @  65b757b745b9 (3) A2
   |
   | o  fdf9bde5129a (2) A1
@@ -881,7 +881,7 @@
        rewritten by test (*) as 65b757b745b9 (glob)
        rewritten by test (*) as fdf9bde5129a (glob)
   
-  $ hg olog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
+  $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -1005,7 +1005,7 @@
  -----------
 
 Check that debugobshistory on head show a coherent graph
-  $ hg olog eb5a0daa2192
+  $ hg obslog eb5a0daa2192
   @    eb5a0daa2192 (4) C0
   |\
   x |  471f378eab4c (1) A0
@@ -1017,7 +1017,7 @@
   x  0dec01379d3b (2) B0
        rewritten by test (*) as b7ea6d14e664 (glob)
   
-  $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -1169,7 +1169,7 @@
  Actual test
  -----------
 
-  $ hg olog 7a230b46bf61
+  $ hg obslog 7a230b46bf61
   @  7a230b46bf61 (3) A2
   |
   x  fdf9bde5129a (2) A1
@@ -1192,7 +1192,7 @@
   (use 'hg evolve' to update to its successor: 7a230b46bf61)
 Check that debugobshistory works with markers pointing to missing local
 changectx
-  $ hg olog 7a230b46bf61
+  $ hg obslog 7a230b46bf61
   o  7a230b46bf61 (2) A2
   |
   x  fdf9bde5129a
@@ -1201,7 +1201,7 @@
   @  471f378eab4c (1) A0
        rewritten by test (*) as fdf9bde5129a (glob)
   
-  $ hg olog 7a230b46bf61 --color=debug
+  $ hg obslog 7a230b46bf61 --color=debug
   o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
   |
   x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
@@ -1210,353 +1210,3 @@
   @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
        [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*)] 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 (*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*) as a8df460dbbfe (glob)
-  |
-
-  $ hg olog "desc(B)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten by test (*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*) as a8df460dbbfe (glob)
-  |
-
-  $ hg olog "desc(C)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten by test (*) as c473644ee0e9 (glob)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten by test (*) as 2a34000d3544 (glob)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten by test (*) 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 (*) as d9f908fde1a1 (glob)
-  |
-  @    868d2e0eb19c (4) D
-  |\     rewritten by test (*) as 0da815c333f6 (glob)
-  | |
-  | x  d9f908fde1a1 (6) F
-  | |    rewritten by test (*) as 868d2e0eb19c (glob)
-  | |
-  +---x  2a34000d3544 (1) A
-  | |      rewritten by test (*) as c473644ee0e9 (glob)
-  | |
-  x |  a8df460dbbfe (3) C
-  | |    rewritten by test (*) as 2a34000d3544, 868d2e0eb19c (glob)
-  | |
-  x |  c473644ee0e9 (2) B
-  | |    rewritten by test (*) 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.t	Fri May 26 15:57:17 2017 +0200
+++ b/tests/test-evolve.t	Fri May 26 16:12:07 2017 +0200
@@ -793,6 +793,17 @@
       more than 2 successors:         0
       available  keys:
                  user:               10
+  marker size:
+      format v1:
+          smallest length:           69
+          longer length:             69
+          median length:             69
+          mean length:               69
+      format v0:
+          smallest length:           * (glob)
+          longer length:             * (glob)
+          median length:             * (glob)
+          mean length:               * (glob)
   disconnected clusters:              1
           any known node:             1
           smallest length:           10
--- a/tests/test-prune.t	Fri May 26 15:57:17 2017 +0200
+++ b/tests/test-prune.t	Fri May 26 16:12:07 2017 +0200
@@ -354,6 +354,17 @@
       more than 2 successors:         0
       available  keys:
                  user:                7
+  marker size:
+      format v1:
+          smallest length:           69
+          longer length:             69
+          median length:             69
+          mean length:               69
+      format v0:
+          smallest length:          * (glob)
+          longer length:            * (glob)
+          median length:            * (glob)
+          mean length:              * (glob)
   disconnected clusters:              7
           any known node:             7
           smallest length:            1