discovery: introduce a official 'obshash associated to a range
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 10 Mar 2017 10:36:46 -0800
changeset 2083 778afb036245
parent 2082 3f787182509f
child 2084 b1f029dcf573
discovery: introduce a official 'obshash associated to a range The hash in a combination of the hash a its subrange. If the range is a leaf, we have the obsmarker relevant to the node in that leaf range.
hgext3rd/evolve/obsdiscovery.py
tests/test-evolve.t
tests/test-exchange-A1.t
tests/test-exchange-A2.t
tests/test-exchange-A3.t
tests/test-exchange-A4.t
tests/test-exchange-A5.t
tests/test-exchange-A6.t
tests/test-exchange-A7.t
tests/test-exchange-B1.t
tests/test-exchange-B2.t
tests/test-exchange-B3.t
tests/test-exchange-B4.t
tests/test-exchange-B5.t
tests/test-exchange-B6.t
tests/test-exchange-B7.t
tests/test-exchange-C1.t
tests/test-exchange-C2.t
tests/test-exchange-C3.t
tests/test-exchange-C4.t
tests/test-exchange-D1.t
tests/test-exchange-D2.t
tests/test-exchange-D3.t
tests/test-exchange-D4.t
tests/test-stablerange.t
--- a/hgext3rd/evolve/obsdiscovery.py	Thu Mar 09 22:57:41 2017 -0800
+++ b/hgext3rd/evolve/obsdiscovery.py	Fri Mar 10 10:36:46 2017 -0800
@@ -295,10 +295,10 @@
                 toproceed.append(r)
     ranges = list(ranges)
     ranges.sort(key=lambda r: (-len(r), n(r.head)))
-    ui.status('rev         node index size depth\n')
+    ui.status('rev         node index size depth      obshash\n')
     for r in ranges:
-        ui.status('%3d %s %5d %4d %5d\n'
-                  % (r.head, s(n(r.head)), r.index, len(r), r.depth))
+        d = (r.head, s(n(r.head)), r.index, len(r), r.depth, node.short(r.obshash))
+        ui.status('%3d %s %5d %4d %5d %s\n' % d)
 
 _depthcache = {}
 def _depth(repo, rev):
@@ -313,7 +313,6 @@
     """return highest power of two lower than 'i'"""
     return 2 ** int(math.log(i - 1, 2))
 
-
 class _range(object):
 
     def __init__(self, repo, head, index, revs=None):
@@ -395,6 +394,51 @@
             assert standard_start < self.depth
             return self._slicesat(standard_start)
 
+    @util.propertycache
+    def obshash(self):
+        cache = self._repo.obsstore.rangeobshashcache
+        cl = self._repo.changelog
+        n = cl.node
+        obshash = cache.get(self._id)
+        if obshash is not None:
+            return obshash
+        sha = hashlib.sha1()
+        count = 0
+        if len(self) == 1:
+            tmarkers = self._repo.obsstore.relevantmarkers([n(self.head)])
+            bmarkers = []
+            for m in tmarkers:
+                mbin = obsolete._fm1encodeonemarker(m)
+                bmarkers.append(mbin)
+            bmarkers.sort()
+            for m in bmarkers:
+                count += 1
+                sha.update(m)
+        else:
+            for subrange in self.subranges():
+                obshash = subrange.obshash
+                if obshash != node.nullid:
+                    count += 1
+                    sha.update(obshash)
+
+        # note: if there is only one subrange with actual data, we'll just
+        # reuse the same hash.
+        if not count:
+            obshash = node.nullid
+        elif count != 1 or obshash is None:
+            obshash = cache[self._id] = sha.digest()
+        return obshash
+
+@eh.wrapfunction(obsolete.obsstore, '_addmarkers')
+def _addmarkers(orig, obsstore, *args, **kwargs):
+    obsstore.rangeobshashcache.clear()
+    return orig(obsstore, *args, **kwargs)
+
+@eh.addattr(obsolete.obsstore, 'rangeobshashcache')
+@util.propertycache
+def rangeobshashcache(obsstore):
+    return {}
+
 #############################
 ### Tree Hash computation ###
 #############################
--- a/tests/test-evolve.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-evolve.t	Fri Mar 10 10:36:46 2017 -0800
@@ -169,6 +169,14 @@
   fbb94e3a0ecf6d20c2cc31152ef162ce45af982f * (glob)
   e44648563c73f75950076031c6fdf06629de95f1 * (glob)
 
+Smoketest stablerange.obshash:
+
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 7c3bad9141dc     0    2     2 * (glob)
+    0 1f0dee641bb7     0    1     1 000000000000
+    1 7c3bad9141dc     1    1     2 * (glob)
+
   $ cd ..
 
 ##########################
--- a/tests/test-exchange-A1.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A1.t	Fri Mar 10 10:36:46 2017 -0800
@@ -45,6 +45,14 @@
   
   $ hg debugobsolete
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 f5bc6836db60     0    2     2 50656e04a95e
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 50656e04a95e
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A2.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A2.t	Fri Mar 10 10:36:46 2017 -0800
@@ -57,6 +57,17 @@
   $ hg debugobsolete
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 35b183996678     0    2     2 b9c8f20eef89
+    1 f5bc6836db60     0    2     2 50656e04a95e
+    2 35b183996678     1    1     2 b9c8f20eef89
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 50656e04a95e
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A3.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A3.t	Fri Mar 10 10:36:46 2017 -0800
@@ -70,6 +70,19 @@
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
+  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    3 e5ea8f9c7314     0    2     2 3bc2ee626e11
+    4 f6298a8ac3a4     0    2     2 91716bfd671b
+    0 a9bdc8b26820     0    1     1 000000000000
+    3 e5ea8f9c7314     1    1     2 3bc2ee626e11
+    4 f6298a8ac3a4     1    1     2 91716bfd671b
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A4.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A4.t	Fri Mar 10 10:36:46 2017 -0800
@@ -63,6 +63,20 @@
   $ hg debugobsolete
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 06055a7959d4     0    3     3 000000000000
+    1 28b51eb45704     0    2     2 5d69322fad9e
+    3 e5ea8f9c7314     0    2     2 cf518031fa75
+    2 06055a7959d4     2    1     3 000000000000
+    1 28b51eb45704     1    1     2 5d69322fad9e
+    0 a9bdc8b26820     0    1     1 000000000000
+    3 e5ea8f9c7314     1    1     2 cf518031fa75
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A5.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A5.t	Fri Mar 10 10:36:46 2017 -0800
@@ -69,6 +69,19 @@
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
+  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
+  8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    4 8c0a98c83722     0    3     3 70185b996296
+    3 f6298a8ac3a4     0    2     2 91716bfd671b
+    4 8c0a98c83722     2    1     3 4d835a45c1e9
+    0 a9bdc8b26820     0    1     1 000000000000
+    3 f6298a8ac3a4     1    1     2 91716bfd671b
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A6.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A6.t	Fri Mar 10 10:36:46 2017 -0800
@@ -59,6 +59,15 @@
   
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 e5ea8f9c7314     0    2     2 3bc2ee626e11
+    0 a9bdc8b26820     0    1     1 000000000000
+    2 e5ea8f9c7314     1    1     2 3bc2ee626e11
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-A7.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-A7.t	Fri Mar 10 10:36:46 2017 -0800
@@ -42,6 +42,14 @@
   
   $ hg debugobsolete
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 f5bc6836db60     0    2     2 50656e04a95e
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 50656e04a95e
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B1.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B1.t	Fri Mar 10 10:36:46 2017 -0800
@@ -46,6 +46,15 @@
   
   $ hg debugobsolete
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 f5bc6836db60     0    2     2 926d9d84b97b
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 926d9d84b97b
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B2.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B2.t	Fri Mar 10 10:36:46 2017 -0800
@@ -41,6 +41,12 @@
   
   $ hg debugobsolete
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    0 a9bdc8b26820     0    1     1 52a5380bc047
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B3.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B3.t	Fri Mar 10 10:36:46 2017 -0800
@@ -57,6 +57,18 @@
   
   $ hg debugobsolete
   e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000
+  35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 35b183996678     0    2     2 631ab4cd02ff
+    1 f5bc6836db60     0    2     2 000000000000
+    2 35b183996678     1    1     2 631ab4cd02ff
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 000000000000
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B4.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B4.t	Fri Mar 10 10:36:46 2017 -0800
@@ -67,6 +67,18 @@
   
   $ hg debugobsolete
   7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 f6fbb35d8ac9     0    3     3 000000000000
+    1 f5bc6836db60     0    2     2 000000000000
+    0 a9bdc8b26820     0    1     1 1900882e85db
+    1 f5bc6836db60     1    1     2 000000000000
+    2 f6fbb35d8ac9     2    1     3 000000000000
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B5.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B5.t	Fri Mar 10 10:36:46 2017 -0800
@@ -66,6 +66,18 @@
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a 201e20697f2a6b0752335af7cd813f140e9e653e
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 ae1ac676a5e6d6f4216595c53da763d588929970
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 06055a7959d4     0    3     3 000000000000
+    1 28b51eb45704     0    2     2 000000000000
+    2 06055a7959d4     2    1     3 000000000000
+    1 28b51eb45704     1    1     2 000000000000
+    0 a9bdc8b26820     0    1     1 554c0b12f7d9
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B6.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B6.t	Fri Mar 10 10:36:46 2017 -0800
@@ -56,6 +56,16 @@
   $ hg debugobsolete
   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
+  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
+  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 f5bc6836db60     0    2     2 000000000000
+    0 a9bdc8b26820     0    1     1 86e41541149f
+    1 f5bc6836db60     1    1     2 000000000000
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-B7.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-B7.t	Fri Mar 10 10:36:46 2017 -0800
@@ -49,6 +49,15 @@
   
   $ hg debugobsolete
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 f5bc6836db60     0    2     2 926d9d84b97b
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 f5bc6836db60     1    1     2 926d9d84b97b
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-C1.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-C1.t	Fri Mar 10 10:36:46 2017 -0800
@@ -48,6 +48,13 @@
   $ hg debugobsolete
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    0 a9bdc8b26820     0    1     1 1ce18e5a71f7
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-C2.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-C2.t	Fri Mar 10 10:36:46 2017 -0800
@@ -55,6 +55,16 @@
   $ hg debugobsolete
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    3 e5ea8f9c7314     0    2     2 289cb0d058c8
+    0 a9bdc8b26820     0    1     1 000000000000
+    3 e5ea8f9c7314     1    1     2 289cb0d058c8
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-C3.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-C3.t	Fri Mar 10 10:36:46 2017 -0800
@@ -60,6 +60,14 @@
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    0 a9bdc8b26820     0    1     1 40be80b35671
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-C4.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-C4.t	Fri Mar 10 10:36:46 2017 -0800
@@ -70,6 +70,16 @@
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be
+  35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 35b183996678     0    2     2 2a098b4a877f
+    2 35b183996678     1    1     2 916e804c50de
+    0 a9bdc8b26820     0    1     1 a9c02d134f5b
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-D1.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-D1.t	Fri Mar 10 10:36:46 2017 -0800
@@ -52,6 +52,14 @@
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    1 e5ea8f9c7314     0    2     2 289cb0d058c8
+    0 a9bdc8b26820     0    1     1 000000000000
+    1 e5ea8f9c7314     1    1     2 289cb0d058c8
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-D2.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-D2.t	Fri Mar 10 10:36:46 2017 -0800
@@ -49,6 +49,12 @@
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    0 a9bdc8b26820     0    1     1 554c0b12f7d9
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-D3.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-D3.t	Fri Mar 10 10:36:46 2017 -0800
@@ -53,6 +53,15 @@
   $ hg debugobsolete
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    2 35b183996678     0    2     2 65a9f21dff07
+    2 35b183996678     1    1     2 65a9f21dff07
+    0 a9bdc8b26820     0    1     1 000000000000
   $ cd ..
   $ cd ..
 
--- a/tests/test-exchange-D4.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-exchange-D4.t	Fri Mar 10 10:36:46 2017 -0800
@@ -65,6 +65,19 @@
   aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  $ hg debugobsrelsethashtree
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a
+  069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0
+  $ hg debugstablerange --rev 'head()'
+  rev         node index size depth      obshash
+    4 069b05c3876d     0    3     3 a2b2331da650
+    3 e5ea8f9c7314     0    2     2 0aacc2f86e8f
+    4 069b05c3876d     2    1     3 901f118d4333
+    0 a9bdc8b26820     0    1     1 000000000000
+    3 e5ea8f9c7314     1    1     2 0aacc2f86e8f
   $ cd ..
   $ cd ..
 
--- a/tests/test-stablerange.t	Thu Mar 09 22:57:41 2017 -0800
+++ b/tests/test-stablerange.t	Fri Mar 10 10:36:46 2017 -0800
@@ -17,113 +17,113 @@
   $ cd repo_linear
   $ hg debugbuilddag '.+6'
   $ hg debugstablerange --rev 1
-  rev         node index size depth
-    1 66f7d451a68b     0    2     2
-    0 1ea73414a91b     0    1     1
-    1 66f7d451a68b     1    1     2
+  rev         node index size depth      obshash
+    1 66f7d451a68b     0    2     2 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
   $ hg debugstablerange --rev 1 > 1.range
 
 bigger subset reuse most of the previous one
 
   $ hg debugstablerange --rev 4
-  rev         node index size depth
-    4 bebd167eb94d     0    5     5
-    3 2dc09a01254d     0    4     4
-    3 2dc09a01254d     2    2     4
-    1 66f7d451a68b     0    2     2
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    1 66f7d451a68b     1    1     2
-    4 bebd167eb94d     4    1     5
+  rev         node index size depth      obshash
+    4 bebd167eb94d     0    5     5 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
   $ hg debugstablerange --rev 4 > 4.range
   $ diff -u 1.range 4.range
   --- 1.range	* (glob)
   +++ 4.range	* (glob)
   @@ -1,4 +1,10 @@
-   rev         node index size depth
-  +  4 bebd167eb94d     0    5     5
-  +  3 2dc09a01254d     0    4     4
-  +  3 2dc09a01254d     2    2     4
-     1 66f7d451a68b     0    2     2
-  +  2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-  +  3 2dc09a01254d     3    1     4
-     1 66f7d451a68b     1    1     2
-  +  4 bebd167eb94d     4    1     5
+   rev         node index size depth      obshash
+  +  4 bebd167eb94d     0    5     5 000000000000
+  +  3 2dc09a01254d     0    4     4 000000000000
+  +  3 2dc09a01254d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+  +  2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  3 2dc09a01254d     3    1     4 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+  +  4 bebd167eb94d     4    1     5 000000000000
   [1]
 
 Using a range not ending on 2**N boundary
 we fall back on 2**N as much as possible
 
   $ hg debugstablerange --rev 5
-  rev         node index size depth
-    5 c8d03c1b5e94     0    6     6
-    3 2dc09a01254d     0    4     4
-    3 2dc09a01254d     2    2     4
-    1 66f7d451a68b     0    2     2
-    5 c8d03c1b5e94     4    2     6
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    1 66f7d451a68b     1    1     2
-    4 bebd167eb94d     4    1     5
-    5 c8d03c1b5e94     5    1     6
+  rev         node index size depth      obshash
+    5 c8d03c1b5e94     0    6     6 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    5 c8d03c1b5e94     4    2     6 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
+    5 c8d03c1b5e94     5    1     6 000000000000
   $ hg debugstablerange --rev 5 > 5.range
   $ diff -u 4.range 5.range
   --- 4.range	* (glob)
   +++ 5.range	* (glob)
   @@ -1,10 +1,12 @@
-   rev         node index size depth
-  -  4 bebd167eb94d     0    5     5
-  +  5 c8d03c1b5e94     0    6     6
-     3 2dc09a01254d     0    4     4
-     3 2dc09a01254d     2    2     4
-     1 66f7d451a68b     0    2     2
-  +  5 c8d03c1b5e94     4    2     6
-     2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-     3 2dc09a01254d     3    1     4
-     1 66f7d451a68b     1    1     2
-     4 bebd167eb94d     4    1     5
-  +  5 c8d03c1b5e94     5    1     6
+   rev         node index size depth      obshash
+  -  4 bebd167eb94d     0    5     5 000000000000
+  +  5 c8d03c1b5e94     0    6     6 000000000000
+     3 2dc09a01254d     0    4     4 000000000000
+     3 2dc09a01254d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+  +  5 c8d03c1b5e94     4    2     6 000000000000
+     2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+     3 2dc09a01254d     3    1     4 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+     4 bebd167eb94d     4    1     5 000000000000
+  +  5 c8d03c1b5e94     5    1     6 000000000000
   [1]
 
 Even two unperfect range overlap a lot
 
   $ hg debugstablerange --rev tip
-  rev         node index size depth
-    6 f69452c5b1af     0    7     7
-    3 2dc09a01254d     0    4     4
-    6 f69452c5b1af     4    3     7
-    3 2dc09a01254d     2    2     4
-    1 66f7d451a68b     0    2     2
-    5 c8d03c1b5e94     4    2     6
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    1 66f7d451a68b     1    1     2
-    4 bebd167eb94d     4    1     5
-    5 c8d03c1b5e94     5    1     6
-    6 f69452c5b1af     6    1     7
+  rev         node index size depth      obshash
+    6 f69452c5b1af     0    7     7 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    6 f69452c5b1af     4    3     7 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    5 c8d03c1b5e94     4    2     6 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
+    5 c8d03c1b5e94     5    1     6 000000000000
+    6 f69452c5b1af     6    1     7 000000000000
   $ hg debugstablerange --rev tip > tip.range
   $ diff -u 5.range tip.range
   --- 5.range	* (glob)
   +++ tip.range	* (glob)
   @@ -1,6 +1,7 @@
-   rev         node index size depth
-  -  5 c8d03c1b5e94     0    6     6
-  +  6 f69452c5b1af     0    7     7
-     3 2dc09a01254d     0    4     4
-  +  6 f69452c5b1af     4    3     7
-     3 2dc09a01254d     2    2     4
-     1 66f7d451a68b     0    2     2
-     5 c8d03c1b5e94     4    2     6
+   rev         node index size depth      obshash
+  -  5 c8d03c1b5e94     0    6     6 000000000000
+  +  6 f69452c5b1af     0    7     7 000000000000
+     3 2dc09a01254d     0    4     4 000000000000
+  +  6 f69452c5b1af     4    3     7 000000000000
+     3 2dc09a01254d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+     5 c8d03c1b5e94     4    2     6 000000000000
   @@ -10,3 +11,4 @@
-     1 66f7d451a68b     1    1     2
-     4 bebd167eb94d     4    1     5
-     5 c8d03c1b5e94     5    1     6
-  +  6 f69452c5b1af     6    1     7
+     1 66f7d451a68b     1    1     2 000000000000
+     4 bebd167eb94d     4    1     5 000000000000
+     5 c8d03c1b5e94     5    1     6 000000000000
+  +  6 f69452c5b1af     6    1     7 000000000000
   [1]
 
   $ cd ..
@@ -169,131 +169,131 @@
 (left branch)
 
   $ hg debugstablerange --rev 'left~2'
-  rev         node index size depth
-    1 66f7d451a68b     0    2     2
-    0 1ea73414a91b     0    1     1
-    1 66f7d451a68b     1    1     2
+  rev         node index size depth      obshash
+    1 66f7d451a68b     0    2     2 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
   $ hg debugstablerange --rev 'left~2' > left-2.range
   $ hg debugstablerange --rev left
-  rev         node index size depth
-    3 2dc09a01254d     0    4     4
-    3 2dc09a01254d     2    2     4
-    1 66f7d451a68b     0    2     2
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    1 66f7d451a68b     1    1     2
+  rev         node index size depth      obshash
+    3 2dc09a01254d     0    4     4 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
   $ hg debugstablerange --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
   @@ -1,4 +1,8 @@
-   rev         node index size depth
-  +  3 2dc09a01254d     0    4     4
-  +  3 2dc09a01254d     2    2     4
-     1 66f7d451a68b     0    2     2
-  +  2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-  +  3 2dc09a01254d     3    1     4
-     1 66f7d451a68b     1    1     2
+   rev         node index size depth      obshash
+  +  3 2dc09a01254d     0    4     4 000000000000
+  +  3 2dc09a01254d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+  +  2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  3 2dc09a01254d     3    1     4 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
   [1]
 
 (right branch)
 
   $ hg debugstablerange --rev right~2
-  rev         node index size depth
-    4 e7bd5218ca15     0    2     2
-    0 1ea73414a91b     0    1     1
-    4 e7bd5218ca15     1    1     2
+  rev         node index size depth      obshash
+    4 e7bd5218ca15     0    2     2 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    4 e7bd5218ca15     1    1     2 000000000000
   $ hg debugstablerange --rev 'right~2' > right-2.range
   $ hg debugstablerange --rev right
-  rev         node index size depth
-    6 a2f58e9c1e56     0    4     4
-    6 a2f58e9c1e56     2    2     4
-    4 e7bd5218ca15     0    2     2
-    0 1ea73414a91b     0    1     1
-    5 3a367db1fabc     2    1     3
-    6 a2f58e9c1e56     3    1     4
-    4 e7bd5218ca15     1    1     2
+  rev         node index size depth      obshash
+    6 a2f58e9c1e56     0    4     4 000000000000
+    6 a2f58e9c1e56     2    2     4 000000000000
+    4 e7bd5218ca15     0    2     2 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    5 3a367db1fabc     2    1     3 000000000000
+    6 a2f58e9c1e56     3    1     4 000000000000
+    4 e7bd5218ca15     1    1     2 000000000000
   $ hg debugstablerange --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
   @@ -1,4 +1,8 @@
-   rev         node index size depth
-  +  6 a2f58e9c1e56     0    4     4
-  +  6 a2f58e9c1e56     2    2     4
-     4 e7bd5218ca15     0    2     2
-     0 1ea73414a91b     0    1     1
-  +  5 3a367db1fabc     2    1     3
-  +  6 a2f58e9c1e56     3    1     4
-     4 e7bd5218ca15     1    1     2
+   rev         node index size depth      obshash
+  +  6 a2f58e9c1e56     0    4     4 000000000000
+  +  6 a2f58e9c1e56     2    2     4 000000000000
+     4 e7bd5218ca15     0    2     2 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  5 3a367db1fabc     2    1     3 000000000000
+  +  6 a2f58e9c1e56     3    1     4 000000000000
+     4 e7bd5218ca15     1    1     2 000000000000
   [1]
 
 The merge reuse as much of the slicing created for one of the branch
 
   $ hg debugstablerange --rev merge
-  rev         node index size depth
-    7 5f18015f9110     0    8     8
-    3 2dc09a01254d     0    4     4
-    7 5f18015f9110     4    4     8
-    3 2dc09a01254d     2    2     4
-    5 3a367db1fabc     1    2     3
-    7 5f18015f9110     6    2     8
-    1 66f7d451a68b     0    2     2
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    5 3a367db1fabc     2    1     3
-    7 5f18015f9110     7    1     8
-    1 66f7d451a68b     1    1     2
-    6 a2f58e9c1e56     3    1     4
-    4 e7bd5218ca15     1    1     2
+  rev         node index size depth      obshash
+    7 5f18015f9110     0    8     8 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    7 5f18015f9110     4    4     8 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    5 3a367db1fabc     1    2     3 000000000000
+    7 5f18015f9110     6    2     8 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    5 3a367db1fabc     2    1     3 000000000000
+    7 5f18015f9110     7    1     8 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    6 a2f58e9c1e56     3    1     4 000000000000
+    4 e7bd5218ca15     1    1     2 000000000000
   $ hg debugstablerange --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
   @@ -1,8 +1,16 @@
-   rev         node index size depth
-  +  7 5f18015f9110     0    8     8
-     3 2dc09a01254d     0    4     4
-  +  7 5f18015f9110     4    4     8
-     3 2dc09a01254d     2    2     4
-  +  5 3a367db1fabc     1    2     3
-  +  7 5f18015f9110     6    2     8
-     1 66f7d451a68b     0    2     2
-     2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-     3 2dc09a01254d     3    1     4
-  +  5 3a367db1fabc     2    1     3
-  +  7 5f18015f9110     7    1     8
-     1 66f7d451a68b     1    1     2
-  +  6 a2f58e9c1e56     3    1     4
-  +  4 e7bd5218ca15     1    1     2
+   rev         node index size depth      obshash
+  +  7 5f18015f9110     0    8     8 000000000000
+     3 2dc09a01254d     0    4     4 000000000000
+  +  7 5f18015f9110     4    4     8 000000000000
+     3 2dc09a01254d     2    2     4 000000000000
+  +  5 3a367db1fabc     1    2     3 000000000000
+  +  7 5f18015f9110     6    2     8 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+     2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+     3 2dc09a01254d     3    1     4 000000000000
+  +  5 3a367db1fabc     2    1     3 000000000000
+  +  7 5f18015f9110     7    1     8 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+  +  6 a2f58e9c1e56     3    1     4 000000000000
+  +  4 e7bd5218ca15     1    1     2 000000000000
   [1]
   $ diff -u right.range merge.range
   --- right.range	* (glob)
   +++ merge.range	* (glob)
   @@ -1,8 +1,16 @@
-   rev         node index size depth
-  -  6 a2f58e9c1e56     0    4     4
-  -  6 a2f58e9c1e56     2    2     4
-  -  4 e7bd5218ca15     0    2     2
-  +  7 5f18015f9110     0    8     8
-  +  3 2dc09a01254d     0    4     4
-  +  7 5f18015f9110     4    4     8
-  +  3 2dc09a01254d     2    2     4
-  +  5 3a367db1fabc     1    2     3
-  +  7 5f18015f9110     6    2     8
-  +  1 66f7d451a68b     0    2     2
-  +  2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-  +  3 2dc09a01254d     3    1     4
-     5 3a367db1fabc     2    1     3
-  +  7 5f18015f9110     7    1     8
-  +  1 66f7d451a68b     1    1     2
-     6 a2f58e9c1e56     3    1     4
-     4 e7bd5218ca15     1    1     2
+   rev         node index size depth      obshash
+  -  6 a2f58e9c1e56     0    4     4 000000000000
+  -  6 a2f58e9c1e56     2    2     4 000000000000
+  -  4 e7bd5218ca15     0    2     2 000000000000
+  +  7 5f18015f9110     0    8     8 000000000000
+  +  3 2dc09a01254d     0    4     4 000000000000
+  +  7 5f18015f9110     4    4     8 000000000000
+  +  3 2dc09a01254d     2    2     4 000000000000
+  +  5 3a367db1fabc     1    2     3 000000000000
+  +  7 5f18015f9110     6    2     8 000000000000
+  +  1 66f7d451a68b     0    2     2 000000000000
+  +  2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  3 2dc09a01254d     3    1     4 000000000000
+     5 3a367db1fabc     2    1     3 000000000000
+  +  7 5f18015f9110     7    1     8 000000000000
+  +  1 66f7d451a68b     1    1     2 000000000000
+     6 a2f58e9c1e56     3    1     4 000000000000
+     4 e7bd5218ca15     1    1     2 000000000000
   [1]
   $ cd ..
 
@@ -349,84 +349,84 @@
 (left branch)
 
   $ hg debugstablerange --rev 'left~2'
-  rev         node index size depth
-    2 01241442b3c2     0    3     3
-    1 66f7d451a68b     0    2     2
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    1 66f7d451a68b     1    1     2
+  rev         node index size depth      obshash
+    2 01241442b3c2     0    3     3 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
   $ hg debugstablerange --rev 'left~2' > left-2.range
   $ hg debugstablerange --rev left
-  rev         node index size depth
-    4 bebd167eb94d     0    5     5
-    3 2dc09a01254d     0    4     4
-    3 2dc09a01254d     2    2     4
-    1 66f7d451a68b     0    2     2
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    1 66f7d451a68b     1    1     2
-    4 bebd167eb94d     4    1     5
+  rev         node index size depth      obshash
+    4 bebd167eb94d     0    5     5 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
   $ hg debugstablerange --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
   @@ -1,6 +1,10 @@
-   rev         node index size depth
-  -  2 01241442b3c2     0    3     3
-  +  4 bebd167eb94d     0    5     5
-  +  3 2dc09a01254d     0    4     4
-  +  3 2dc09a01254d     2    2     4
-     1 66f7d451a68b     0    2     2
-     2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-  +  3 2dc09a01254d     3    1     4
-     1 66f7d451a68b     1    1     2
-  +  4 bebd167eb94d     4    1     5
+   rev         node index size depth      obshash
+  -  2 01241442b3c2     0    3     3 000000000000
+  +  4 bebd167eb94d     0    5     5 000000000000
+  +  3 2dc09a01254d     0    4     4 000000000000
+  +  3 2dc09a01254d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+     2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  3 2dc09a01254d     3    1     4 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+  +  4 bebd167eb94d     4    1     5 000000000000
   [1]
 
 (right branch)
 
   $ hg debugstablerange --rev right~2
-  rev         node index size depth
-    7 42b07e8da27d     0    4     4
-    7 42b07e8da27d     2    2     4
-    5 de561312eff4     0    2     2
-    0 1ea73414a91b     0    1     1
-    7 42b07e8da27d     3    1     4
-    6 b9bc20507e0b     2    1     3
-    5 de561312eff4     1    1     2
+  rev         node index size depth      obshash
+    7 42b07e8da27d     0    4     4 000000000000
+    7 42b07e8da27d     2    2     4 000000000000
+    5 de561312eff4     0    2     2 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    7 42b07e8da27d     3    1     4 000000000000
+    6 b9bc20507e0b     2    1     3 000000000000
+    5 de561312eff4     1    1     2 000000000000
   $ hg debugstablerange --rev 'right~2' > right-2.range
   $ hg debugstablerange --rev right
-  rev         node index size depth
-    9 f4b7da68b467     0    6     6
-    7 42b07e8da27d     0    4     4
-    7 42b07e8da27d     2    2     4
-    5 de561312eff4     0    2     2
-    9 f4b7da68b467     4    2     6
-    0 1ea73414a91b     0    1     1
-    7 42b07e8da27d     3    1     4
-    8 857477a9aebb     4    1     5
-    6 b9bc20507e0b     2    1     3
-    5 de561312eff4     1    1     2
-    9 f4b7da68b467     5    1     6
+  rev         node index size depth      obshash
+    9 f4b7da68b467     0    6     6 000000000000
+    7 42b07e8da27d     0    4     4 000000000000
+    7 42b07e8da27d     2    2     4 000000000000
+    5 de561312eff4     0    2     2 000000000000
+    9 f4b7da68b467     4    2     6 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    7 42b07e8da27d     3    1     4 000000000000
+    8 857477a9aebb     4    1     5 000000000000
+    6 b9bc20507e0b     2    1     3 000000000000
+    5 de561312eff4     1    1     2 000000000000
+    9 f4b7da68b467     5    1     6 000000000000
   $ hg debugstablerange --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
   @@ -1,8 +1,12 @@
-   rev         node index size depth
-  +  9 f4b7da68b467     0    6     6
-     7 42b07e8da27d     0    4     4
-     7 42b07e8da27d     2    2     4
-     5 de561312eff4     0    2     2
-  +  9 f4b7da68b467     4    2     6
-     0 1ea73414a91b     0    1     1
-     7 42b07e8da27d     3    1     4
-  +  8 857477a9aebb     4    1     5
-     6 b9bc20507e0b     2    1     3
-     5 de561312eff4     1    1     2
-  +  9 f4b7da68b467     5    1     6
+   rev         node index size depth      obshash
+  +  9 f4b7da68b467     0    6     6 000000000000
+     7 42b07e8da27d     0    4     4 000000000000
+     7 42b07e8da27d     2    2     4 000000000000
+     5 de561312eff4     0    2     2 000000000000
+  +  9 f4b7da68b467     4    2     6 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+     7 42b07e8da27d     3    1     4 000000000000
+  +  8 857477a9aebb     4    1     5 000000000000
+     6 b9bc20507e0b     2    1     3 000000000000
+     5 de561312eff4     1    1     2 000000000000
+  +  9 f4b7da68b467     5    1     6 000000000000
   [1]
 
 In this case, the bottom of the split will have multiple heads,
@@ -436,147 +436,147 @@
 We are still able to reuse one of the branch however
 
   $ hg debugstablerange --rev merge
-  rev         node index size depth
-   10 8aca7f8c9bd2     0   11    11
-    4 bebd167eb94d     0    5     5
-    3 2dc09a01254d     0    4     4
-    7 42b07e8da27d     0    4     4
-   10 8aca7f8c9bd2     8    3    11
-    3 2dc09a01254d     2    2     4
-    7 42b07e8da27d     2    2     4
-    1 66f7d451a68b     0    2     2
-    5 de561312eff4     0    2     2
-    9 f4b7da68b467     4    2     6
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    7 42b07e8da27d     3    1     4
-    1 66f7d451a68b     1    1     2
-    8 857477a9aebb     4    1     5
-   10 8aca7f8c9bd2    10    1    11
-    6 b9bc20507e0b     2    1     3
-    4 bebd167eb94d     4    1     5
-    5 de561312eff4     1    1     2
-    9 f4b7da68b467     5    1     6
+  rev         node index size depth      obshash
+   10 8aca7f8c9bd2     0   11    11 000000000000
+    4 bebd167eb94d     0    5     5 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    7 42b07e8da27d     0    4     4 000000000000
+   10 8aca7f8c9bd2     8    3    11 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    7 42b07e8da27d     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    5 de561312eff4     0    2     2 000000000000
+    9 f4b7da68b467     4    2     6 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    7 42b07e8da27d     3    1     4 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    8 857477a9aebb     4    1     5 000000000000
+   10 8aca7f8c9bd2    10    1    11 000000000000
+    6 b9bc20507e0b     2    1     3 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
+    5 de561312eff4     1    1     2 000000000000
+    9 f4b7da68b467     5    1     6 000000000000
   $ hg debugstablerange --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
   @@ -1,10 +1,22 @@
-   rev         node index size depth
-  + 10 8aca7f8c9bd2     0   11    11
-     4 bebd167eb94d     0    5     5
-     3 2dc09a01254d     0    4     4
-  +  7 42b07e8da27d     0    4     4
-  + 10 8aca7f8c9bd2     8    3    11
-     3 2dc09a01254d     2    2     4
-  +  7 42b07e8da27d     2    2     4
-     1 66f7d451a68b     0    2     2
-  +  5 de561312eff4     0    2     2
-  +  9 f4b7da68b467     4    2     6
-     2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-     3 2dc09a01254d     3    1     4
-  +  7 42b07e8da27d     3    1     4
-     1 66f7d451a68b     1    1     2
-  +  8 857477a9aebb     4    1     5
-  + 10 8aca7f8c9bd2    10    1    11
-  +  6 b9bc20507e0b     2    1     3
-     4 bebd167eb94d     4    1     5
-  +  5 de561312eff4     1    1     2
-  +  9 f4b7da68b467     5    1     6
+   rev         node index size depth      obshash
+  + 10 8aca7f8c9bd2     0   11    11 000000000000
+     4 bebd167eb94d     0    5     5 000000000000
+     3 2dc09a01254d     0    4     4 000000000000
+  +  7 42b07e8da27d     0    4     4 000000000000
+  + 10 8aca7f8c9bd2     8    3    11 000000000000
+     3 2dc09a01254d     2    2     4 000000000000
+  +  7 42b07e8da27d     2    2     4 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+  +  5 de561312eff4     0    2     2 000000000000
+  +  9 f4b7da68b467     4    2     6 000000000000
+     2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+     3 2dc09a01254d     3    1     4 000000000000
+  +  7 42b07e8da27d     3    1     4 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+  +  8 857477a9aebb     4    1     5 000000000000
+  + 10 8aca7f8c9bd2    10    1    11 000000000000
+  +  6 b9bc20507e0b     2    1     3 000000000000
+     4 bebd167eb94d     4    1     5 000000000000
+  +  5 de561312eff4     1    1     2 000000000000
+  +  9 f4b7da68b467     5    1     6 000000000000
   [1]
   $ diff -u right.range merge.range
   --- right.range	* (glob)
   +++ merge.range	* (glob)
   @@ -1,12 +1,22 @@
-   rev         node index size depth
-  -  9 f4b7da68b467     0    6     6
-  + 10 8aca7f8c9bd2     0   11    11
-  +  4 bebd167eb94d     0    5     5
-  +  3 2dc09a01254d     0    4     4
-     7 42b07e8da27d     0    4     4
-  + 10 8aca7f8c9bd2     8    3    11
-  +  3 2dc09a01254d     2    2     4
-     7 42b07e8da27d     2    2     4
-  +  1 66f7d451a68b     0    2     2
-     5 de561312eff4     0    2     2
-     9 f4b7da68b467     4    2     6
-  +  2 01241442b3c2     2    1     3
-     0 1ea73414a91b     0    1     1
-  +  3 2dc09a01254d     3    1     4
-     7 42b07e8da27d     3    1     4
-  +  1 66f7d451a68b     1    1     2
-     8 857477a9aebb     4    1     5
-  + 10 8aca7f8c9bd2    10    1    11
-     6 b9bc20507e0b     2    1     3
-  +  4 bebd167eb94d     4    1     5
-     5 de561312eff4     1    1     2
-     9 f4b7da68b467     5    1     6
+   rev         node index size depth      obshash
+  -  9 f4b7da68b467     0    6     6 000000000000
+  + 10 8aca7f8c9bd2     0   11    11 000000000000
+  +  4 bebd167eb94d     0    5     5 000000000000
+  +  3 2dc09a01254d     0    4     4 000000000000
+     7 42b07e8da27d     0    4     4 000000000000
+  + 10 8aca7f8c9bd2     8    3    11 000000000000
+  +  3 2dc09a01254d     2    2     4 000000000000
+     7 42b07e8da27d     2    2     4 000000000000
+  +  1 66f7d451a68b     0    2     2 000000000000
+     5 de561312eff4     0    2     2 000000000000
+     9 f4b7da68b467     4    2     6 000000000000
+  +  2 01241442b3c2     2    1     3 000000000000
+     0 1ea73414a91b     0    1     1 000000000000
+  +  3 2dc09a01254d     3    1     4 000000000000
+     7 42b07e8da27d     3    1     4 000000000000
+  +  1 66f7d451a68b     1    1     2 000000000000
+     8 857477a9aebb     4    1     5 000000000000
+  + 10 8aca7f8c9bd2    10    1    11 000000000000
+     6 b9bc20507e0b     2    1     3 000000000000
+  +  4 bebd167eb94d     4    1     5 000000000000
+     5 de561312eff4     1    1     2 000000000000
+     9 f4b7da68b467     5    1     6 000000000000
   [1]
 
 Range above the merge, reuse subrange from the merge
 
   $ hg debugstablerange --rev tip
-  rev         node index size depth
-   12 e6b8d5b46647     0   13    13
-    4 bebd167eb94d     0    5     5
-   12 e6b8d5b46647     8    5    13
-    3 2dc09a01254d     0    4     4
-    7 42b07e8da27d     0    4     4
-   11 485383494a89     8    4    12
-    3 2dc09a01254d     2    2     4
-    7 42b07e8da27d     2    2     4
-   11 485383494a89    10    2    12
-    1 66f7d451a68b     0    2     2
-    5 de561312eff4     0    2     2
-    9 f4b7da68b467     4    2     6
-    2 01241442b3c2     2    1     3
-    0 1ea73414a91b     0    1     1
-    3 2dc09a01254d     3    1     4
-    7 42b07e8da27d     3    1     4
-   11 485383494a89    11    1    12
-    1 66f7d451a68b     1    1     2
-    8 857477a9aebb     4    1     5
-   10 8aca7f8c9bd2    10    1    11
-    6 b9bc20507e0b     2    1     3
-    4 bebd167eb94d     4    1     5
-    5 de561312eff4     1    1     2
-   12 e6b8d5b46647    12    1    13
-    9 f4b7da68b467     5    1     6
+  rev         node index size depth      obshash
+   12 e6b8d5b46647     0   13    13 000000000000
+    4 bebd167eb94d     0    5     5 000000000000
+   12 e6b8d5b46647     8    5    13 000000000000
+    3 2dc09a01254d     0    4     4 000000000000
+    7 42b07e8da27d     0    4     4 000000000000
+   11 485383494a89     8    4    12 000000000000
+    3 2dc09a01254d     2    2     4 000000000000
+    7 42b07e8da27d     2    2     4 000000000000
+   11 485383494a89    10    2    12 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+    5 de561312eff4     0    2     2 000000000000
+    9 f4b7da68b467     4    2     6 000000000000
+    2 01241442b3c2     2    1     3 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    3 2dc09a01254d     3    1     4 000000000000
+    7 42b07e8da27d     3    1     4 000000000000
+   11 485383494a89    11    1    12 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+    8 857477a9aebb     4    1     5 000000000000
+   10 8aca7f8c9bd2    10    1    11 000000000000
+    6 b9bc20507e0b     2    1     3 000000000000
+    4 bebd167eb94d     4    1     5 000000000000
+    5 de561312eff4     1    1     2 000000000000
+   12 e6b8d5b46647    12    1    13 000000000000
+    9 f4b7da68b467     5    1     6 000000000000
   $ hg debugstablerange --rev 'tip' > tip.range
   $ diff -u merge.range tip.range
   --- merge.range	* (glob)
   +++ tip.range	* (glob)
   @@ -1,11 +1,13 @@
-   rev         node index size depth
-  - 10 8aca7f8c9bd2     0   11    11
-  + 12 e6b8d5b46647     0   13    13
-     4 bebd167eb94d     0    5     5
-  + 12 e6b8d5b46647     8    5    13
-     3 2dc09a01254d     0    4     4
-     7 42b07e8da27d     0    4     4
-  - 10 8aca7f8c9bd2     8    3    11
-  + 11 485383494a89     8    4    12
-     3 2dc09a01254d     2    2     4
-     7 42b07e8da27d     2    2     4
-  + 11 485383494a89    10    2    12
-     1 66f7d451a68b     0    2     2
-     5 de561312eff4     0    2     2
-     9 f4b7da68b467     4    2     6
+   rev         node index size depth      obshash
+  - 10 8aca7f8c9bd2     0   11    11 000000000000
+  + 12 e6b8d5b46647     0   13    13 000000000000
+     4 bebd167eb94d     0    5     5 000000000000
+  + 12 e6b8d5b46647     8    5    13 000000000000
+     3 2dc09a01254d     0    4     4 000000000000
+     7 42b07e8da27d     0    4     4 000000000000
+  - 10 8aca7f8c9bd2     8    3    11 000000000000
+  + 11 485383494a89     8    4    12 000000000000
+     3 2dc09a01254d     2    2     4 000000000000
+     7 42b07e8da27d     2    2     4 000000000000
+  + 11 485383494a89    10    2    12 000000000000
+     1 66f7d451a68b     0    2     2 000000000000
+     5 de561312eff4     0    2     2 000000000000
+     9 f4b7da68b467     4    2     6 000000000000
   @@ -13,10 +15,12 @@
-     0 1ea73414a91b     0    1     1
-     3 2dc09a01254d     3    1     4
-     7 42b07e8da27d     3    1     4
-  + 11 485383494a89    11    1    12
-     1 66f7d451a68b     1    1     2
-     8 857477a9aebb     4    1     5
-    10 8aca7f8c9bd2    10    1    11
-     6 b9bc20507e0b     2    1     3
-     4 bebd167eb94d     4    1     5
-     5 de561312eff4     1    1     2
-  + 12 e6b8d5b46647    12    1    13
-     9 f4b7da68b467     5    1     6
+     0 1ea73414a91b     0    1     1 000000000000
+     3 2dc09a01254d     3    1     4 000000000000
+     7 42b07e8da27d     3    1     4 000000000000
+  + 11 485383494a89    11    1    12 000000000000
+     1 66f7d451a68b     1    1     2 000000000000
+     8 857477a9aebb     4    1     5 000000000000
+    10 8aca7f8c9bd2    10    1    11 000000000000
+     6 b9bc20507e0b     2    1     3 000000000000
+     4 bebd167eb94d     4    1     5 000000000000
+     5 de561312eff4     1    1     2 000000000000
+  + 12 e6b8d5b46647    12    1    13 000000000000
+     9 f4b7da68b467     5    1     6 000000000000
   [1]
 
   $ cd ..
@@ -633,40 +633,40 @@
   o  0 1ea73414a91b r0
   
   $ hg debugstablerange --rev 'head()'
-  rev         node index size depth
-   15 1d8d22637c2d     0    8     8
-    9 dcbb326fdec2     0    7     7
-   10 ff43616e5d0f     0    7     7
-   13 b4594d867745     0    6     6
-   12 e46a4836065c     0    6     6
-    6 2702dd0c91e7     0    5     5
-   15 1d8d22637c2d     4    4     8
-    3 2b6d669947cd     0    4     4
-    5 f0f3ef9a6cd5     0    4     4
-    9 dcbb326fdec2     4    3     7
-   10 ff43616e5d0f     4    3     7
-   15 1d8d22637c2d     6    2     8
-    3 2b6d669947cd     2    2     4
-    1 66f7d451a68b     0    2     2
-   13 b4594d867745     4    2     6
-    8 d62d843c9a01     4    2     6
-   12 e46a4836065c     4    2     6
-    5 f0f3ef9a6cd5     2    2     4
-    2 fa942426a6fd     0    2     2
-   15 1d8d22637c2d     7    1     8
-    0 1ea73414a91b     0    1     1
-    6 2702dd0c91e7     4    1     5
-    3 2b6d669947cd     3    1     4
-   14 43227190fef8     4    1     5
-    4 4c748ffd1a46     2    1     3
-    1 66f7d451a68b     1    1     2
-   13 b4594d867745     5    1     6
-   11 bab5d5bf48bd     4    1     5
-    8 d62d843c9a01     5    1     6
-    9 dcbb326fdec2     6    1     7
-   12 e46a4836065c     5    1     6
-    7 e7d9710d9fc6     4    1     5
-    5 f0f3ef9a6cd5     3    1     4
-    2 fa942426a6fd     1    1     2
-   10 ff43616e5d0f     6    1     7
+  rev         node index size depth      obshash
+   15 1d8d22637c2d     0    8     8 000000000000
+    9 dcbb326fdec2     0    7     7 000000000000
+   10 ff43616e5d0f     0    7     7 000000000000
+   13 b4594d867745     0    6     6 000000000000
+   12 e46a4836065c     0    6     6 000000000000
+    6 2702dd0c91e7     0    5     5 000000000000
+   15 1d8d22637c2d     4    4     8 000000000000
+    3 2b6d669947cd     0    4     4 000000000000
+    5 f0f3ef9a6cd5     0    4     4 000000000000
+    9 dcbb326fdec2     4    3     7 000000000000
+   10 ff43616e5d0f     4    3     7 000000000000
+   15 1d8d22637c2d     6    2     8 000000000000
+    3 2b6d669947cd     2    2     4 000000000000
+    1 66f7d451a68b     0    2     2 000000000000
+   13 b4594d867745     4    2     6 000000000000
+    8 d62d843c9a01     4    2     6 000000000000
+   12 e46a4836065c     4    2     6 000000000000
+    5 f0f3ef9a6cd5     2    2     4 000000000000
+    2 fa942426a6fd     0    2     2 000000000000
+   15 1d8d22637c2d     7    1     8 000000000000
+    0 1ea73414a91b     0    1     1 000000000000
+    6 2702dd0c91e7     4    1     5 000000000000
+    3 2b6d669947cd     3    1     4 000000000000
+   14 43227190fef8     4    1     5 000000000000
+    4 4c748ffd1a46     2    1     3 000000000000
+    1 66f7d451a68b     1    1     2 000000000000
+   13 b4594d867745     5    1     6 000000000000
+   11 bab5d5bf48bd     4    1     5 000000000000
+    8 d62d843c9a01     5    1     6 000000000000
+    9 dcbb326fdec2     6    1     7 000000000000
+   12 e46a4836065c     5    1     6 000000000000
+    7 e7d9710d9fc6     4    1     5 000000000000
+    5 f0f3ef9a6cd5     3    1     4 000000000000
+    2 fa942426a6fd     1    1     2 000000000000
+   10 ff43616e5d0f     6    1     7 000000000000
   $ cd ..