changeset 49242:75d0775dce7f

debugdeltachain: also display p1/p2 Looking at the parents is a common need when trying to understanding why a delta was chosen, having it readily available helps a lot.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 18 May 2022 17:22:32 +0100
parents 3376b5d9a697
children e7d23c512d3d
files mercurial/debugcommands.py tests/test-debugcommands.t tests/test-generaldelta.t tests/test-parseindex.t tests/test-revlog.t tests/test-upgrade-repo.t
diffstat 6 files changed, 238 insertions(+), 222 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Wed May 18 16:50:55 2022 +0100
+++ b/mercurial/debugcommands.py	Wed May 18 17:22:32 2022 +0100
@@ -758,6 +758,8 @@
     Output can be templatized. Available template keywords are:
 
     :``rev``:       revision number
+    :``p1``:        parent 1 revision number (for reference)
+    :``p2``:        parent 2 revision number (for reference)
     :``chainid``:   delta chain identifier (numbered by unique base)
     :``chainlen``:  delta chain length to this revision
     :``prevrev``:   previous revision in delta chain
@@ -829,12 +831,12 @@
             e = index[iterrev]
             chainsize += e[revlog_constants.ENTRY_DATA_COMPRESSED_LENGTH]
 
-        return compsize, uncompsize, deltatype, chain, chainsize
+        return p1, p2, compsize, uncompsize, deltatype, chain, chainsize
 
     fm = ui.formatter(b'debugdeltachain', opts)
 
     fm.plain(
-        b'    rev  chain# chainlen     prev   delta       '
+        b'    rev      p1      p2  chain# chainlen     prev   delta       '
         b'size    rawsize  chainsize     ratio   lindist extradist '
         b'extraratio'
     )
@@ -844,7 +846,7 @@
 
     chainbases = {}
     for rev in r:
-        comp, uncomp, deltatype, chain, chainsize = revinfo(rev)
+        p1, p2, comp, uncomp, deltatype, chain, chainsize = revinfo(rev)
         chainbase = chain[0]
         chainid = chainbases.setdefault(chainbase, len(chainbases) + 1)
         basestart = start(chainbase)
@@ -868,11 +870,13 @@
 
         fm.startitem()
         fm.write(
-            b'rev chainid chainlen prevrev deltatype compsize '
+            b'rev p1 p2 chainid chainlen prevrev deltatype compsize '
             b'uncompsize chainsize chainratio lindist extradist '
             b'extraratio',
-            b'%7d %7d %8d %8d %7s %10d %10d %10d %9.5f %9d %9d %10.5f',
+            b'%7d %7d %7d %7d %8d %8d %7s %10d %10d %10d %9.5f %9d %9d %10.5f',
             rev,
+            p1,
+            p2,
             chainid,
             len(chain),
             prevrev,
--- a/tests/test-debugcommands.t	Wed May 18 16:50:55 2022 +0100
+++ b/tests/test-debugcommands.t	Wed May 18 17:22:32 2022 +0100
@@ -197,10 +197,10 @@
 
 #if reporevlogstore no-pure
   $ hg debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
-        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
-        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
-        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0      -1      -1       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
+        1       0      -1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
+        2       1      -1       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
 
   $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
   0 1 1
@@ -220,6 +220,8 @@
     "extraratio": 0.0,
     "largestblock": 44,
     "lindist": 44,
+    "p1": -1,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1.0,
     "readsize": 44,
@@ -238,6 +240,8 @@
     "extraratio": 0,
     "largestblock": 0,
     "lindist": 0,
+    "p1": 0,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1,
     "readsize": 0,
@@ -256,6 +260,8 @@
     "extraratio": 0.0,
     "largestblock": 44,
     "lindist": 44,
+    "p1": 1,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1.0,
     "readsize": 44,
@@ -272,10 +278,10 @@
   > sparse-read = True
   > EOF
   $ hg debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
-        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
-        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
-        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0      -1      -1       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
+        1       0      -1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
+        2       1      -1       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
 
   $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n'
   0 1 1 44 44 1.0
@@ -295,6 +301,8 @@
     "extraratio": 0.0,
     "largestblock": 44,
     "lindist": 44,
+    "p1": -1,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1.0,
     "readsize": 44,
@@ -313,6 +321,8 @@
     "extraratio": 0,
     "largestblock": 0,
     "lindist": 0,
+    "p1": 0,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1,
     "readsize": 0,
@@ -331,6 +341,8 @@
     "extraratio": 0.0,
     "largestblock": 44,
     "lindist": 44,
+    "p1": 1,
+    "p2": -1,
     "prevrev": -1,
     "readdensity": 1.0,
     "readsize": 44,
--- a/tests/test-generaldelta.t	Wed May 18 16:50:55 2022 +0100
+++ b/tests/test-generaldelta.t	Wed May 18 17:22:32 2022 +0100
@@ -74,8 +74,8 @@
   $ cd client
   $ hg pull -q ../server -r 4
   $ hg debugdeltachain x
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base          3          2          3   1.50000         3         0    0.00000
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base          3          2          3   1.50000         3         0    0.00000
 
   $ cd ..
 
@@ -104,23 +104,23 @@
   updating to branch default
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -R repo debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
-        1       1        2        0    prev         57        135        1??   1.?????       16?         0    0.00000 (glob)
-        2       1        3        1    prev         57        135        2??   1.6????       2??         0    0.00000 (glob)
-        3       2        1       -1    base        104        135        104   0.77037       104         0    0.00000
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
+        1       0      -1       1        2        0    prev         57        135        1??   1.?????       16?         0    0.00000 (glob)
+        2       0      -1       1        3        1    prev         57        135        2??   1.6????       2??         0    0.00000 (glob)
+        3       0      -1       2        1       -1    base        104        135        104   0.77037       104         0    0.00000
   $ hg -R usegd debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
-        1       1        2        0      p1         57        135        16?   1.?????       16?         0    0.00000 (glob)
-        2       1        3        1    prev         57        135        2??   1.6????       2??         0    0.00000 (glob)
-        3       1        2        0      p1         57        135        16?   1.?????       27?       114    0.????? (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
+        1       0      -1       1        2        0      p1         57        135        16?   1.?????       16?         0    0.00000 (glob)
+        2       0      -1       1        3        1    prev         57        135        2??   1.6????       2??         0    0.00000 (glob)
+        3       0      -1       1        2        0      p1         57        135        16?   1.?????       27?       114    0.????? (glob)
   $ hg -R full debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
-        1       1        2        0      p1         57        135        16?   1.?????       16?         0    0.00000 (glob)
-        2       1        2        0      p1         57        135        16?   1.?????       2??        57    0.3???? (glob)
-        3       1        2        0      p1         57        135        16?   1.?????       27?       114    0.????? (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base        10?        135        10?   0.7????       10?         0    0.00000 (glob)
+        1       0      -1       1        2        0      p1         57        135        16?   1.?????       16?         0    0.00000 (glob)
+        2       0      -1       1        2        0      p1         57        135        16?   1.?????       2??        57    0.3???? (glob)
+        3       0      -1       1        2        0      p1         57        135        16?   1.?????       27?       114    0.????? (glob)
 
 Test revlog.optimize-delta-parent-choice
 
@@ -140,10 +140,10 @@
   $ hg merge -q 0
   $ hg commit -q -m merge
   $ hg debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         ??        215         ??   0.?????        ??         0    0.00000 (glob)
-        1       1        2        0    prev         ??         86        1??   1.?????       1??         0    0.00000 (glob)
-        2       1        2        0      p2         ??        301        1??   0.4????       ???        ??    0.5???? (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base         ??        215         ??   0.?????        ??         0    0.00000 (glob)
+        1      -1      -1       1        2        0    prev         ??         86        1??   1.?????       1??         0    0.00000 (glob)
+        2       1       0       1        2        0      p2         ??        301        1??   0.4????       ???        ??    0.5???? (glob)
 
   $ hg strip -q -r . --config extensions.strip=
 
@@ -152,10 +152,10 @@
   $ hg merge -q 0
   $ hg commit -q -m merge --config storage.revlog.optimize-delta-parent-choice=yes
   $ hg debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         ??        215         ??   0.?????        ??         0    0.00000 (glob)
-        1       1        2        0    prev         ??         86        1??   1.?????       1??         0    0.00000 (glob)
-        2       1        2        0      p2         ??        301        1??   0.4????       ???        ??    0.5???? (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base         ??        215         ??   0.?????        ??         0    0.00000 (glob)
+        1      -1      -1       1        2        0    prev         ??         86        1??   1.?????       1??         0    0.00000 (glob)
+        2       1       0       1        2        0      p2         ??        301        1??   0.4????       ???        ??    0.5???? (glob)
 
 Test that strip bundle use bundle2
   $ hg --config extensions.strip= strip .
@@ -216,62 +216,62 @@
   $ 
   $ cd ..
   $ hg -R source-repo debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
-        2       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
-        3       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
-        4       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
-        5       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
-        6       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        7       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
-        8       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
-        9       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
-       10       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
-       11       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
-       12       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
-       13       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
-       14       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
-       15       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
-       16       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
-       17       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
-       18       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
-       19       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
-       20       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
-       21       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
-       22       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
-       23       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
-       24       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
-       25       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
-       26       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
-       27       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
-       28       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
-       29       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
-       30       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
-       31       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
-       32       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
-       33       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
-       34       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
-       35       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
-       36       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
-       37       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
-       38       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
-       39       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
-       40       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
-       41       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
-       42       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
-       43       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
-       44       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
-       45       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
-       46       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
-       47       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
-       48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-       49       4        1       -1    base        ???        316        ???   0.6????       ???         0    0.00000 (glob)
-       50       4        2       49      p1         58        362        2??   0.7????       2??         0    0.00000 (glob)
-       51       4        3       50    prev        3??        5??        6??   1.0????       6??         0    0.00000 (glob)
-       52       4        4       51      p1         58        640        6??   1.0????       6??         0    0.00000 (glob)
-       53       5        1       -1    base          0          0          0   0.00000         0         0    0.00000
-       54       6        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        1       0      -1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
+        2       1      -1       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
+        3       2      -1       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
+        4       3      -1       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
+        5       4      -1       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
+        6      -1      -1       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        7       6      -1       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
+        8       7      -1       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
+        9       8      -1       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
+       10       9      -1       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
+       11      10      -1       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
+       12      11      -1       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
+       13      12      -1       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
+       14      13      -1       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
+       15      14      -1       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
+       16      15      -1       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
+       17      16      -1       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
+       18      -1      -1       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
+       19      18      -1       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
+       20      19      -1       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
+       21      20      -1       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
+       22      21      -1       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
+       23      22      -1       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
+       24      23      -1       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
+       25      24      -1       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
+       26      25      -1       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
+       27      26      -1       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
+       28      27      -1       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
+       29      28      -1       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
+       30      29      -1       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
+       31      30      -1       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
+       32      31      -1       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
+       33      32      -1       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
+       34      33      -1       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
+       35      34      -1       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
+       36      35      -1       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
+       37      36      -1       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
+       38      37      -1       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
+       39      38      -1       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
+       40      39      -1       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
+       41      40      -1       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
+       42      41      -1       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
+       43      42      -1       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
+       44      43      -1       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
+       45      44      -1       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
+       46      45      -1       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
+       47      46      -1       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
+       48      47      -1       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
+       49       5      -1       4        1       -1    base        ???        316        ???   0.6????       ???         0    0.00000 (glob)
+       50      49      -1       4        2       49      p1         58        362        2??   0.7????       2??         0    0.00000 (glob)
+       51      17      -1       4        3       50    prev        3??        5??        6??   1.0????       6??         0    0.00000 (glob)
+       52      51      -1       4        4       51      p1         58        640        6??   1.0????       6??         0    0.00000 (glob)
+       53      52      -1       5        1       -1    base          0          0          0   0.00000         0         0    0.00000
+       54      53      -1       6        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
   requesting all changes
   adding changesets
@@ -282,62 +282,62 @@
   updating to branch default
   14 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -R relax-chain debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
-        2       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
-        3       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
-        4       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
-        5       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
-        6       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        7       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
-        8       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
-        9       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
-       10       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
-       11       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
-       12       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
-       13       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
-       14       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
-       15       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
-       16       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
-       17       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
-       18       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
-       19       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
-       20       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
-       21       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
-       22       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
-       23       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
-       24       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
-       25       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
-       26       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
-       27       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
-       28       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
-       29       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
-       30       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
-       31       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
-       32       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
-       33       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
-       34       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
-       35       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
-       36       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
-       37       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
-       38       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
-       39       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
-       40       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
-       41       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
-       42       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
-       43       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
-       44       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
-       45       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
-       46       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
-       47       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
-       48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-       49       4        1       -1    base        ???        316        ???   0.6????       ???         0    0.00000 (glob)
-       50       4        2       49      p1         58        362        2??   0.7????       2??         0    0.00000 (glob)
-       51       2       13       17      p1         58        594        739   1.24411      278?      20??    2.7???? (glob)
-       52       5        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
-       53       6        1       -1    base          0          0          0   0.00000         0         0    0.00000
-       54       7        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        1       0      -1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
+        2       1      -1       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
+        3       2      -1       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
+        4       3      -1       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
+        5       4      -1       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
+        6      -1      -1       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        7       6      -1       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
+        8       7      -1       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
+        9       8      -1       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
+       10       9      -1       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
+       11      10      -1       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
+       12      11      -1       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
+       13      12      -1       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
+       14      13      -1       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
+       15      14      -1       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
+       16      15      -1       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
+       17      16      -1       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
+       18      -1      -1       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
+       19      18      -1       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
+       20      19      -1       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
+       21      20      -1       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
+       22      21      -1       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
+       23      22      -1       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
+       24      23      -1       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
+       25      24      -1       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
+       26      25      -1       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
+       27      26      -1       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
+       28      27      -1       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
+       29      28      -1       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
+       30      29      -1       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
+       31      30      -1       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
+       32      31      -1       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
+       33      32      -1       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
+       34      33      -1       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
+       35      34      -1       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
+       36      35      -1       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
+       37      36      -1       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
+       38      37      -1       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
+       39      38      -1       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
+       40      39      -1       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
+       41      40      -1       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
+       42      41      -1       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
+       43      42      -1       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
+       44      43      -1       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
+       45      44      -1       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
+       46      45      -1       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
+       47      46      -1       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
+       48      47      -1       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
+       49       5      -1       4        1       -1    base        ???        316        ???   0.6????       ???         0    0.00000 (glob)
+       50      49      -1       4        2       49      p1         58        362        2??   0.7????       2??         0    0.00000 (glob)
+       51      17      -1       2       13       17      p1         58        594        739   1.24411      278?      20??    2.7???? (glob)
+       52      51      -1       5        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
+       53      52      -1       6        1       -1    base          0          0          0   0.00000         0         0    0.00000
+       54      53      -1       7        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no
   requesting all changes
   adding changesets
@@ -348,59 +348,59 @@
   updating to branch default
   14 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -R noconst-chain debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
-        2       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
-        3       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
-        4       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
-        5       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
-        6       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
-        7       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
-        8       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
-        9       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
-       10       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
-       11       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
-       12       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
-       13       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
-       14       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
-       15       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
-       16       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
-       17       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
-       18       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
-       19       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
-       20       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
-       21       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
-       22       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
-       23       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
-       24       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
-       25       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
-       26       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
-       27       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
-       28       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
-       29       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
-       30       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
-       31       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
-       32       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
-       33       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
-       34       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
-       35       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
-       36       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
-       37       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
-       38       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
-       39       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
-       40       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
-       41       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
-       42       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
-       43       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
-       44       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
-       45       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
-       46       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
-       47       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
-       48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-       49       1        7        5      p1         58        316        389   1.23101      2857      2468    6.34447
-       50       1        8       49      p1         58        362        447   1.23481      2915      2468    5.52125
-       51       2       13       17      p1         58        594        739   1.24411      2642      1903    2.57510
-       52       2       14       51      p1         58        640        797   1.24531      2700      1903    2.38770
-       53       4        1       -1    base          0          0          0   0.00000         0         0    0.00000
-       54       5        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0      -1      -1       1        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        1       0      -1       1        2        0      p1         57         90        103   1.14444       103         0    0.00000
+        2       1      -1       1        3        1      p1         57        135        160   1.18519       160         0    0.00000
+        3       2      -1       1        4        2      p1         57        180        217   1.20556       217         0    0.00000
+        4       3      -1       1        5        3      p1         57        225        274   1.21778       274         0    0.00000
+        5       4      -1       1        6        4      p1         57        270        331   1.22593       331         0    0.00000
+        6      -1      -1       2        1       -1    base         46         45         46   1.02222        46         0    0.00000
+        7       6      -1       2        2        6      p1         57         90        103   1.14444       103         0    0.00000
+        8       7      -1       2        3        7      p1         57        135        160   1.18519       160         0    0.00000
+        9       8      -1       2        4        8      p1         57        180        217   1.20556       217         0    0.00000
+       10       9      -1       2        5        9      p1         58        226        275   1.21681       275         0    0.00000
+       11      10      -1       2        6       10      p1         58        272        333   1.22426       333         0    0.00000
+       12      11      -1       2        7       11      p1         58        318        391   1.22956       391         0    0.00000
+       13      12      -1       2        8       12      p1         58        364        449   1.23352       449         0    0.00000
+       14      13      -1       2        9       13      p1         58        410        507   1.23659       507         0    0.00000
+       15      14      -1       2       10       14      p1         58        456        565   1.23904       565         0    0.00000
+       16      15      -1       2       11       15      p1         58        502        623   1.24104       623         0    0.00000
+       17      16      -1       2       12       16      p1         58        548        681   1.24270       681         0    0.00000
+       18      -1      -1       3        1       -1    base         47         46         47   1.02174        47         0    0.00000
+       19      18      -1       3        2       18      p1         58         92        105   1.14130       105         0    0.00000
+       20      19      -1       3        3       19      p1         58        138        163   1.18116       163         0    0.00000
+       21      20      -1       3        4       20      p1         58        184        221   1.20109       221         0    0.00000
+       22      21      -1       3        5       21      p1         58        230        279   1.21304       279         0    0.00000
+       23      22      -1       3        6       22      p1         58        276        337   1.22101       337         0    0.00000
+       24      23      -1       3        7       23      p1         58        322        395   1.22671       395         0    0.00000
+       25      24      -1       3        8       24      p1         58        368        453   1.23098       453         0    0.00000
+       26      25      -1       3        9       25      p1         58        414        511   1.23430       511         0    0.00000
+       27      26      -1       3       10       26      p1         58        460        569   1.23696       569         0    0.00000
+       28      27      -1       3       11       27      p1         58        506        627   1.23913       627         0    0.00000
+       29      28      -1       3       12       28      p1         58        552        685   1.24094       685         0    0.00000
+       30      29      -1       3       13       29      p1         58        598        743   1.24247       743         0    0.00000
+       31      30      -1       3       14       30      p1         58        644        801   1.24379       801         0    0.00000
+       32      31      -1       3       15       31      p1         58        690        859   1.24493       859         0    0.00000
+       33      32      -1       3       16       32      p1         58        736        917   1.24592       917         0    0.00000
+       34      33      -1       3       17       33      p1         58        782        975   1.24680       975         0    0.00000
+       35      34      -1       3       18       34      p1         58        828       1033   1.24758      1033         0    0.00000
+       36      35      -1       3       19       35      p1         58        874       1091   1.24828      1091         0    0.00000
+       37      36      -1       3       20       36      p1         58        920       1149   1.24891      1149         0    0.00000
+       38      37      -1       3       21       37      p1         58        966       1207   1.24948      1207         0    0.00000
+       39      38      -1       3       22       38      p1         58       1012       1265   1.25000      1265         0    0.00000
+       40      39      -1       3       23       39      p1         58       1058       1323   1.25047      1323         0    0.00000
+       41      40      -1       3       24       40      p1         58       1104       1381   1.25091      1381         0    0.00000
+       42      41      -1       3       25       41      p1         58       1150       1439   1.25130      1439         0    0.00000
+       43      42      -1       3       26       42      p1         58       1196       1497   1.25167      1497         0    0.00000
+       44      43      -1       3       27       43      p1         58       1242       1555   1.25201      1555         0    0.00000
+       45      44      -1       3       28       44      p1         58       1288       1613   1.25233      1613         0    0.00000
+       46      45      -1       3       29       45      p1         58       1334       1671   1.25262      1671         0    0.00000
+       47      46      -1       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
+       48      47      -1       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
+       49       5      -1       1        7        5      p1         58        316        389   1.23101      2857      2468    6.34447
+       50      49      -1       1        8       49      p1         58        362        447   1.23481      2915      2468    5.52125
+       51      17      -1       2       13       17      p1         58        594        739   1.24411      2642      1903    2.57510
+       52      51      -1       2       14       51      p1         58        640        797   1.24531      2700      1903    2.38770
+       53      52      -1       4        1       -1    base          0          0          0   0.00000         0         0    0.00000
+       54      53      -1       5        1       -1    base        3??        640        3??   0.5????       3??         0    0.00000 (glob)
--- a/tests/test-parseindex.t	Wed May 18 16:50:55 2022 +0100
+++ b/tests/test-parseindex.t	Wed May 18 17:22:32 2022 +0100
@@ -155,9 +155,9 @@
        1 0000       65      1      0      2 26333235a41c
 
   $ hg -R limit debugdeltachain -c
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
-        1       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0       2      -1       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
+        1       0       2       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
 
   $ hg -R neglimit debugrevlogindex -f1 -c
      rev flag     size   link     p1     p2       nodeid
@@ -170,9 +170,9 @@
        1 0000       65      1      0  65536 26333235a41c
 
   $ hg -R segv debugdeltachain -c
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
-        1       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
+        0   65536      -1       1        1       -1    base         63         62         63   1.01613        63         0    0.00000
+        1       0   65536       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
 
   $ cat <<EOF > test.py
   > import sys
--- a/tests/test-revlog.t	Wed May 18 16:50:55 2022 +0100
+++ b/tests/test-revlog.t	Wed May 18 17:22:32 2022 +0100
@@ -76,8 +76,8 @@
   $ tar --force-local -xf "$TESTDIR"/bundles/test-revlog-diff-relative-to-nullrev.tar
   $ cd nullrev-diff
   $ hg debugdeltachain a
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
-        0       1        2       -1      p1         15          3         15   5.00000        15         0    0.00000         15         15   1.00000        1
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0      -1      -1       1        2       -1      p1         15          3         15   5.00000        15         0    0.00000         15         15   1.00000        1
   $ hg cat --config rhg.cat=true -r 0 a
   hi
   $ cd ..
--- a/tests/test-upgrade-repo.t	Wed May 18 16:50:55 2022 +0100
+++ b/tests/test-upgrade-repo.t	Wed May 18 17:22:32 2022 +0100
@@ -1453,10 +1453,10 @@
   format.revlog-compression=$BUNDLE2_COMPRESSIONS$
   format.maxchainlen=9001
   $ hg debugdeltachain file
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
-        0       1        1       -1    base         77        182         77   0.42308        77         0    0.00000         77         77   1.00000        1
-        1       1        2        0      p1         21        191         98   0.51309        98         0    0.00000         98         98   1.00000        1
-        2       1        2        0    snap         30        200        107   0.53500       128        21    0.19626        128        128   0.83594        1
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0      -1      -1       1        1       -1    base         77        182         77   0.42308        77         0    0.00000         77         77   1.00000        1
+        1       0      -1       1        2        0      p1         21        191         98   0.51309        98         0    0.00000         98         98   1.00000        1
+        2       1      -1       1        2        0    snap         30        200        107   0.53500       128        21    0.19626        128        128   0.83594        1
 
   $ hg debugupgraderepo --run --optimize 're-delta-all'
   upgrade will perform the following actions:
@@ -1501,10 +1501,10 @@
   copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
   the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
   $ hg debugdeltachain file
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
-        0       1        1       -1    base         77        182         77   0.42308        77         0    0.00000         77         77   1.00000        1
-        1       1        2        0      p1         21        191         98   0.51309        98         0    0.00000         98         98   1.00000        1
-        2       1        3        1      p1         21        200        119   0.59500       119         0    0.00000        119        119   1.00000        1
+      rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0      -1      -1       1        1       -1    base         77        182         77   0.42308        77         0    0.00000         77         77   1.00000        1
+        1       0      -1       1        2        0      p1         21        191         98   0.51309        98         0    0.00000         98         98   1.00000        1
+        2       1      -1       1        3        1      p1         21        200        119   0.59500       119         0    0.00000        119        119   1.00000        1
   $ cd ..
 
   $ cat << EOF >> $HGRCPATH