debugobshashrange: add a --subranges option
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 24 Mar 2017 09:49:03 +0100
changeset 2230 a202f3af890c
parent 2229 575561934439
child 2231 f872738bb5b3
debugobshashrange: add a --subranges option We stop displaying -everything- by default, since is is usually very large. This will help getting better timing when measuring cache effect too, since we won't need to dig out deep cache value that real life usage would not touch.
hgext3rd/evolve/obsdiscovery.py
tests/test-discovery-obshashrange.t
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	Fri Mar 24 09:42:39 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Fri Mar 24 09:49:03 2017 +0100
@@ -388,7 +388,8 @@
 @eh.command(
     'debugobshashrange',
     [
-        ('', 'rev', [], 'heads to start from'),
+        ('', 'rev', [], 'display obshash for all (rev, 0) range in REVS'),
+        ('', 'subranges', False, 'display all subranges'),
     ],
     _(''))
 def debugobshashrange(ui, repo, **opts):
@@ -401,7 +402,10 @@
     cl = repo.changelog
     rangelength = repo.stablerange.rangelength
     depthrev = repo.stablerange.depthrev
-    ranges = stablerange.subrangesclosure(repo, revs)
+    if opts['subranges']:
+        ranges = stablerange.subrangesclosure(repo, revs)
+    else:
+        ranges = [(r, 0) for r in revs]
     headers = ('rev', 'node', 'index', 'size', 'depth', 'obshash')
     linetemplate = '%12d %12s %12d %12d %12d %12s\n'
     headertemplate = linetemplate.replace('d', 's')
--- a/tests/test-discovery-obshashrange.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-discovery-obshashrange.t	Fri Mar 24 09:49:03 2017 +0100
@@ -57,7 +57,7 @@
   dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 4de32a90b66cd083ebf3c00b41277aa7abca51dd 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
-  $ hg debugobshashrange --rev tip
+  $ hg debugobshashrange --subranges --rev tip
            rev         node        index         size        depth      obshash
              7 4de32a90b66c            0            8            8 38d1e7ad86ea
              3 2dc09a01254d            0            4            4 000000000000
--- a/tests/test-evolve.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-evolve.t	Fri Mar 24 09:49:03 2017 +0100
@@ -171,7 +171,7 @@
 
 Smoketest stablerange.obshash:
 
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 7c3bad9141dc            0            2            2 * (glob)
              0 1f0dee641bb7            0            1            1 000000000000
--- a/tests/test-exchange-A1.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A1.t	Fri Mar 24 09:49:03 2017 +0100
@@ -48,7 +48,7 @@
   $ hg debugobsrelsethashtree
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 f5bc6836db60            0            2            2 50656e04a95e
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-A2.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A2.t	Fri Mar 24 09:49:03 2017 +0100
@@ -61,7 +61,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
   35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 35b183996678            0            2            2 b9c8f20eef89
              1 f5bc6836db60            0            2            2 50656e04a95e
--- a/tests/test-exchange-A3.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A3.t	Fri Mar 24 09:49:03 2017 +0100
@@ -76,7 +76,7 @@
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              3 e5ea8f9c7314            0            2            2 3bc2ee626e11
              4 f6298a8ac3a4            0            2            2 91716bfd671b
--- a/tests/test-exchange-A4.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A4.t	Fri Mar 24 09:49:03 2017 +0100
@@ -68,7 +68,7 @@
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
   06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 06055a7959d4            0            3            3 000000000000
              1 28b51eb45704            0            2            2 5d69322fad9e
--- a/tests/test-exchange-A5.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A5.t	Fri Mar 24 09:49:03 2017 +0100
@@ -75,7 +75,7 @@
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
   8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              4 8c0a98c83722            0            3            3 70185b996296
              3 f6298a8ac3a4            0            2            2 91716bfd671b
--- a/tests/test-exchange-A6.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A6.t	Fri Mar 24 09:49:03 2017 +0100
@@ -63,7 +63,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 e5ea8f9c7314            0            2            2 3bc2ee626e11
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-A7.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-A7.t	Fri Mar 24 09:49:03 2017 +0100
@@ -45,7 +45,7 @@
   $ hg debugobsrelsethashtree
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 f5bc6836db60            0            2            2 50656e04a95e
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-B1.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B1.t	Fri Mar 24 09:49:03 2017 +0100
@@ -50,7 +50,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 f5bc6836db60            0            2            2 926d9d84b97b
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-B2.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B2.t	Fri Mar 24 09:49:03 2017 +0100
@@ -44,7 +44,7 @@
   $ hg debugobsrelsethashtree
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              0 a9bdc8b26820            0            1            1 52a5380bc047
   $ cd ..
--- a/tests/test-exchange-B3.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B3.t	Fri Mar 24 09:49:03 2017 +0100
@@ -62,7 +62,7 @@
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000
   35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3
   e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 35b183996678            0            2            2 631ab4cd02ff
              1 f5bc6836db60            0            2            2 000000000000
--- a/tests/test-exchange-B4.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B4.t	Fri Mar 24 09:49:03 2017 +0100
@@ -72,7 +72,7 @@
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508
   7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 f6fbb35d8ac9            0            3            3 000000000000
              1 f5bc6836db60            0            2            2 000000000000
--- a/tests/test-exchange-B5.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B5.t	Fri Mar 24 09:49:03 2017 +0100
@@ -71,7 +71,7 @@
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 201e20697f2a6b0752335af7cd813f140e9e653e
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 ae1ac676a5e6d6f4216595c53da763d588929970
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 06055a7959d4            0            3            3 000000000000
              1 28b51eb45704            0            2            2 000000000000
--- a/tests/test-exchange-B6.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B6.t	Fri Mar 24 09:49:03 2017 +0100
@@ -61,7 +61,7 @@
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
   962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
   f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 f5bc6836db60            0            2            2 000000000000
              0 a9bdc8b26820            0            1            1 86e41541149f
--- a/tests/test-exchange-B7.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-B7.t	Fri Mar 24 09:49:03 2017 +0100
@@ -53,7 +53,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 f5bc6836db60            0            2            2 926d9d84b97b
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-C1.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-C1.t	Fri Mar 24 09:49:03 2017 +0100
@@ -52,7 +52,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468
   f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              0 a9bdc8b26820            0            1            1 1ce18e5a71f7
   $ cd ..
--- a/tests/test-exchange-C2.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-C2.t	Fri Mar 24 09:49:03 2017 +0100
@@ -60,7 +60,7 @@
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              3 e5ea8f9c7314            0            2            2 289cb0d058c8
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-C3.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-C3.t	Fri Mar 24 09:49:03 2017 +0100
@@ -65,7 +65,7 @@
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f
   06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              0 a9bdc8b26820            0            1            1 40be80b35671
   $ cd ..
--- a/tests/test-exchange-C4.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-C4.t	Fri Mar 24 09:49:03 2017 +0100
@@ -75,7 +75,7 @@
   f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be
   35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327
   7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 35b183996678            0            2            2 2a098b4a877f
              2 35b183996678            1            1            2 916e804c50de
--- a/tests/test-exchange-D1.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-D1.t	Fri Mar 24 09:49:03 2017 +0100
@@ -55,7 +55,7 @@
   $ hg debugobsrelsethashtree
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              1 e5ea8f9c7314            0            2            2 289cb0d058c8
              0 a9bdc8b26820            0            1            1 000000000000
--- a/tests/test-exchange-D2.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-D2.t	Fri Mar 24 09:49:03 2017 +0100
@@ -52,7 +52,7 @@
   $ hg debugobsrelsethashtree
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              0 a9bdc8b26820            0            1            1 554c0b12f7d9
   $ cd ..
--- a/tests/test-exchange-D3.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-D3.t	Fri Mar 24 09:49:03 2017 +0100
@@ -57,7 +57,7 @@
   a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
   28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
   35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              2 35b183996678            0            2            2 65a9f21dff07
              2 35b183996678            1            1            2 65a9f21dff07
--- a/tests/test-exchange-D4.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-exchange-D4.t	Fri Mar 24 09:49:03 2017 +0100
@@ -71,7 +71,7 @@
   6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
   e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a
   069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              4 069b05c3876d            0            3            3 a2b2331da650
              3 e5ea8f9c7314            0            2            2 0aacc2f86e8f
--- a/tests/test-stablerange.t	Fri Mar 24 09:42:39 2017 +0100
+++ b/tests/test-stablerange.t	Fri Mar 24 09:49:03 2017 +0100
@@ -16,16 +16,16 @@
   $ hg init repo_linear
   $ cd repo_linear
   $ hg debugbuilddag '.+6'
-  $ hg debugobshashrange --rev 1
+  $ hg debugobshashrange --subranges --rev 1
            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 debugobshashrange --rev 1 > 1.range
+  $ hg debugobshashrange --subranges --rev 1 > 1.range
 
 bigger subset reuse most of the previous one
 
-  $ hg debugobshashrange --rev 4
+  $ hg debugobshashrange --subranges --rev 4
            rev         node        index         size        depth      obshash
              4 bebd167eb94d            0            5            5 000000000000
              3 2dc09a01254d            0            4            4 000000000000
@@ -36,7 +36,7 @@
              3 2dc09a01254d            3            1            4 000000000000
              1 66f7d451a68b            1            1            2 000000000000
              4 bebd167eb94d            4            1            5 000000000000
-  $ hg debugobshashrange --rev 4 > 4.range
+  $ hg debugobshashrange --subranges --rev 4 > 4.range
   $ diff -u 1.range 4.range
   --- 1.range	* (glob)
   +++ 4.range	* (glob)
@@ -56,7 +56,7 @@
 Using a range not ending on 2**N boundary
 we fall back on 2**N as much as possible
 
-  $ hg debugobshashrange --rev 5
+  $ hg debugobshashrange --subranges --rev 5
            rev         node        index         size        depth      obshash
              5 c8d03c1b5e94            0            6            6 000000000000
              3 2dc09a01254d            0            4            4 000000000000
@@ -69,7 +69,7 @@
              1 66f7d451a68b            1            1            2 000000000000
              4 bebd167eb94d            4            1            5 000000000000
              5 c8d03c1b5e94            5            1            6 000000000000
-  $ hg debugobshashrange --rev 5 > 5.range
+  $ hg debugobshashrange --subranges --rev 5 > 5.range
   $ diff -u 4.range 5.range
   --- 4.range	* (glob)
   +++ 5.range	* (glob)
@@ -91,7 +91,7 @@
 
 Even two unperfect range overlap a lot
 
-  $ hg debugobshashrange --rev tip
+  $ hg debugobshashrange --subranges --rev tip
            rev         node        index         size        depth      obshash
              6 f69452c5b1af            0            7            7 000000000000
              3 2dc09a01254d            0            4            4 000000000000
@@ -106,7 +106,7 @@
              4 bebd167eb94d            4            1            5 000000000000
              5 c8d03c1b5e94            5            1            6 000000000000
              6 f69452c5b1af            6            1            7 000000000000
-  $ hg debugobshashrange --rev tip > tip.range
+  $ hg debugobshashrange --subranges --rev tip > tip.range
   $ diff -u 5.range tip.range
   --- 5.range	* (glob)
   +++ tip.range	* (glob)
@@ -168,13 +168,13 @@
 
 (left branch)
 
-  $ hg debugobshashrange --rev 'left~2'
+  $ hg debugobshashrange --subranges --rev 'left~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 debugobshashrange --rev 'left~2' > left-2.range
-  $ hg debugobshashrange --rev left
+  $ hg debugobshashrange --subranges --rev 'left~2' > left-2.range
+  $ hg debugobshashrange --subranges --rev left
            rev         node        index         size        depth      obshash
              3 2dc09a01254d            0            4            4 000000000000
              3 2dc09a01254d            2            2            4 000000000000
@@ -183,7 +183,7 @@
              0 1ea73414a91b            0            1            1 000000000000
              3 2dc09a01254d            3            1            4 000000000000
              1 66f7d451a68b            1            1            2 000000000000
-  $ hg debugobshashrange --rev 'left' > left.range
+  $ hg debugobshashrange --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -200,13 +200,13 @@
 
 (right branch)
 
-  $ hg debugobshashrange --rev right~2
+  $ hg debugobshashrange --subranges --rev right~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 debugobshashrange --rev 'right~2' > right-2.range
-  $ hg debugobshashrange --rev right
+  $ hg debugobshashrange --subranges --rev 'right~2' > right-2.range
+  $ hg debugobshashrange --subranges --rev right
            rev         node        index         size        depth      obshash
              6 a2f58e9c1e56            0            4            4 000000000000
              6 a2f58e9c1e56            2            2            4 000000000000
@@ -215,7 +215,7 @@
              5 3a367db1fabc            2            1            3 000000000000
              6 a2f58e9c1e56            3            1            4 000000000000
              4 e7bd5218ca15            1            1            2 000000000000
-  $ hg debugobshashrange --rev 'right' > right.range
+  $ hg debugobshashrange --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -232,7 +232,7 @@
 
 The merge reuse as much of the slicing created for one of the branch
 
-  $ hg debugobshashrange --rev merge
+  $ hg debugobshashrange --subranges --rev merge
            rev         node        index         size        depth      obshash
              7 5f18015f9110            0            8            8 000000000000
              3 2dc09a01254d            0            4            4 000000000000
@@ -249,7 +249,7 @@
              1 66f7d451a68b            1            1            2 000000000000
              6 a2f58e9c1e56            3            1            4 000000000000
              4 e7bd5218ca15            1            1            2 000000000000
-  $ hg debugobshashrange --rev 'merge' > merge.range
+  $ hg debugobshashrange --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -348,15 +348,15 @@
 
 (left branch)
 
-  $ hg debugobshashrange --rev 'left~2'
+  $ hg debugobshashrange --subranges --rev 'left~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 debugobshashrange --rev 'left~2' > left-2.range
-  $ hg debugobshashrange --rev left
+  $ hg debugobshashrange --subranges --rev 'left~2' > left-2.range
+  $ hg debugobshashrange --subranges --rev left
            rev         node        index         size        depth      obshash
              4 bebd167eb94d            0            5            5 000000000000
              3 2dc09a01254d            0            4            4 000000000000
@@ -367,7 +367,7 @@
              3 2dc09a01254d            3            1            4 000000000000
              1 66f7d451a68b            1            1            2 000000000000
              4 bebd167eb94d            4            1            5 000000000000
-  $ hg debugobshashrange --rev 'left' > left.range
+  $ hg debugobshashrange --subranges --rev 'left' > left.range
   $ diff -u left-2.range left.range
   --- left-2.range	* (glob)
   +++ left.range	* (glob)
@@ -387,7 +387,7 @@
 
 (right branch)
 
-  $ hg debugobshashrange --rev right~2
+  $ hg debugobshashrange --subranges --rev right~2
            rev         node        index         size        depth      obshash
              7 42b07e8da27d            0            4            4 000000000000
              7 42b07e8da27d            2            2            4 000000000000
@@ -396,8 +396,8 @@
              7 42b07e8da27d            3            1            4 000000000000
              6 b9bc20507e0b            2            1            3 000000000000
              5 de561312eff4            1            1            2 000000000000
-  $ hg debugobshashrange --rev 'right~2' > right-2.range
-  $ hg debugobshashrange --rev right
+  $ hg debugobshashrange --subranges --rev 'right~2' > right-2.range
+  $ hg debugobshashrange --subranges --rev right
            rev         node        index         size        depth      obshash
              9 f4b7da68b467            0            6            6 000000000000
              7 42b07e8da27d            0            4            4 000000000000
@@ -410,7 +410,7 @@
              6 b9bc20507e0b            2            1            3 000000000000
              5 de561312eff4            1            1            2 000000000000
              9 f4b7da68b467            5            1            6 000000000000
-  $ hg debugobshashrange --rev 'right' > right.range
+  $ hg debugobshashrange --subranges --rev 'right' > right.range
   $ diff -u right-2.range right.range
   --- right-2.range	* (glob)
   +++ right.range	* (glob)
@@ -435,7 +435,7 @@
 
 We are still able to reuse one of the branch however
 
-  $ hg debugobshashrange --rev merge
+  $ hg debugobshashrange --subranges --rev merge
            rev         node        index         size        depth      obshash
             10 8aca7f8c9bd2            0           11           11 000000000000
              4 bebd167eb94d            0            5            5 000000000000
@@ -458,7 +458,7 @@
              4 bebd167eb94d            4            1            5 000000000000
              5 de561312eff4            1            1            2 000000000000
              9 f4b7da68b467            5            1            6 000000000000
-  $ hg debugobshashrange --rev 'merge' > merge.range
+  $ hg debugobshashrange --subranges --rev 'merge' > merge.range
   $ diff -u left.range merge.range
   --- left.range	* (glob)
   +++ merge.range	* (glob)
@@ -517,7 +517,7 @@
 
 Range above the merge, reuse subrange from the merge
 
-  $ hg debugobshashrange --rev tip
+  $ hg debugobshashrange --subranges --rev tip
            rev         node        index         size        depth      obshash
             12 e6b8d5b46647            0           13           13 000000000000
              4 bebd167eb94d            0            5            5 000000000000
@@ -544,7 +544,7 @@
              5 de561312eff4            1            1            2 000000000000
             12 e6b8d5b46647           12            1           13 000000000000
              9 f4b7da68b467            5            1            6 000000000000
-  $ hg debugobshashrange --rev 'tip' > tip.range
+  $ hg debugobshashrange --subranges --rev 'tip' > tip.range
   $ diff -u merge.range tip.range
   --- merge.range	* (glob)
   +++ tip.range	* (glob)
@@ -632,7 +632,7 @@
   |/
   o  0 1ea73414a91b r0
   
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
             15 1d8d22637c2d            0            8            8 000000000000
              9 dcbb326fdec2            0            7            7 000000000000
@@ -692,7 +692,7 @@
   |/
   o  0 1ea73414a91b r0
   
-  $ hg debugobshashrange --rev 'head()'
+  $ hg debugobshashrange --subranges --rev 'head()'
            rev         node        index         size        depth      obshash
              4 f37e476fba9a            0            5            5 000000000000
              3 36315563e2fa            0            3            3 000000000000