debugcommands: drop base revision from debugindex
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 02 Apr 2018 16:28:20 -0700
changeset 37282 009d0283de5f
parent 37281 806b07d7c7d6
child 37283 d4e62df1c73d
debugcommands: drop base revision from debugindex Revlog index data consists of generic index metadata that will likely be implemented across all storage engines and revlog-specifc metadata. Most tests printing index data only care about the generic fields. This commit drops the printing of the base revision from `hg debugindex`. This value is an implementation detail of revlogs / delta chains. If tests are interested in verifying this implementation detail, `hg debugdeltachain` is a better command. Most tests were skipping over this field anyway. Tests that weren't looked like they were newer. So my guess is we forgot to make them skip the field to match the style of the older tests. This reinforces my belief that the base revision is not worth having in `hg debugindex`. Differential Revision: https://phab.mercurial-scm.org/D3027
mercurial/debugcommands.py
tests/test-changelog-exec.t
tests/test-clone-r.t
tests/test-commit-amend.t
tests/test-commit.t
tests/test-copy.t
tests/test-debugcommands.t
tests/test-excessive-merge.t
tests/test-extra-filelog-entry.t
tests/test-filebranch.t
tests/test-flags.t
tests/test-issue522.t
tests/test-merge-commit.t
tests/test-merge7.t
tests/test-narrow-debugcommands.t
tests/test-narrow-update.t
tests/test-parseindex.t
tests/test-rename-merge1.t
tests/test-revlog-packentry.t
tests/test-revlog.t
tests/test-strip-cross.t
tests/test-treemanifest.t
--- a/mercurial/debugcommands.py	Mon Apr 02 16:24:57 2018 -0700
+++ b/mercurial/debugcommands.py	Mon Apr 02 16:28:20 2018 -0700
@@ -1059,12 +1059,6 @@
     if format not in (0, 1):
         raise error.Abort(_("unknown format %d") % format)
 
-    generaldelta = r.version & revlog.FLAG_GENERALDELTA
-    if generaldelta:
-        basehdr = ' delta'
-    else:
-        basehdr = '  base'
-
     if ui.debugflag:
         shortfn = hex
     else:
@@ -1077,32 +1071,27 @@
         break
 
     if format == 0:
-        ui.write(("   rev    offset  length " + basehdr + " linkrev"
+        ui.write(("   rev    offset  length linkrev"
                  " %s %s p2\n") % ("nodeid".ljust(idlen), "p1".ljust(idlen)))
     elif format == 1:
-        ui.write(("   rev flag   offset   length"
-                 "     size " + basehdr + "   link     p1     p2"
+        ui.write(("   rev flag   offset   length     size   link     p1     p2"
                  " %s\n") % "nodeid".rjust(idlen))
 
     for i in r:
         node = r.node(i)
-        if generaldelta:
-            base = r.deltaparent(i)
-        else:
-            base = r.chainbase(i)
         if format == 0:
             try:
                 pp = r.parents(node)
             except Exception:
                 pp = [nullid, nullid]
-            ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % (
-                    i, r.start(i), r.length(i), base, r.linkrev(i),
+            ui.write("% 6d % 9d % 7d % 7d %s %s %s\n" % (
+                    i, r.start(i), r.length(i), r.linkrev(i),
                     shortfn(node), shortfn(pp[0]), shortfn(pp[1])))
         elif format == 1:
             pr = r.parentrevs(i)
-            ui.write("% 6d %04x % 8d % 8d % 8d % 6d % 6d % 6d % 6d %s\n" % (
+            ui.write("% 6d %04x % 8d % 8d % 8d % 6d % 6d % 6d %s\n" % (
                     i, r.flags(i), r.start(i), r.length(i), r.rawsize(i),
-                    base, r.linkrev(i), pr[0], pr[1], shortfn(node)))
+                    r.linkrev(i), pr[0], pr[1], shortfn(node)))
 
 @command('debugindexdot', cmdutil.debugrevlogopts,
     _('-c|-m|FILE'), optionalrepo=True)
--- a/tests/test-changelog-exec.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-changelog-exec.t	Mon Apr 02 16:28:20 2018 -0700
@@ -51,7 +51,7 @@
   
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       5  .....       1 b004912a8510 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       5       1 b004912a8510 000000000000 000000000000
 
   $ cd ..
--- a/tests/test-clone-r.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-clone-r.t	Mon Apr 02 16:28:20 2018 -0700
@@ -38,33 +38,33 @@
   $ hg commit -m "0.3m"
 
   $ hg debugindex -f 1 afile
-     rev flag   offset   length     size  .....   link     p1     p2       nodeid (re)
-       0 0000        0        3        2  .....      0     -1     -1 362fef284ce2 (re)
-       1 0000        3        5        4  .....      1      0     -1 125144f7e028 (re)
-       2 0000        8        7        6  .....      2      1     -1 4c982badb186 (re)
-       3 0000       15        9        8  .....      3      2     -1 19b1fc555737 (re)
+     rev flag   offset   length     size   link     p1     p2       nodeid
+       0 0000        0        3        2      0     -1     -1 362fef284ce2
+       1 0000        3        5        4      1      0     -1 125144f7e028
+       2 0000        8        7        6      2      1     -1 4c982badb186
+       3 0000       15        9        8      3      2     -1 19b1fc555737
 
   $ hg debugindex adifferentfile
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      75  .....       7 2565f3199a74 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      75       7 2565f3199a74 000000000000 000000000000
 
   $ hg debugindex anotherfile
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      75  .....       8 2565f3199a74 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      75       8 2565f3199a74 000000000000 000000000000
 
   $ hg debugindex fred
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       8  .....       6 12ab3bcc5ea4 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       8       6 12ab3bcc5ea4 000000000000 000000000000
 
   $ hg debugindex --manifest
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      48  .....       0 43eadb1d2d06 000000000000 000000000000 (re)
-       1        48      48  .....       1 8b89697eba2c 43eadb1d2d06 000000000000 (re)
-       2        96      48  .....       2 626a32663c2f 8b89697eba2c 000000000000 (re)
-       3       144      48  .....       3 f54c32f13478 626a32663c2f 000000000000 (re)
-       4       192      ..  .....       6 de68e904d169 626a32663c2f 000000000000 (re)
-       5       2..      ..  .....       7 09bb521d218d de68e904d169 000000000000 (re)
-       6       3..      54  .....       8 1fde233dfb0f f54c32f13478 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      48       0 43eadb1d2d06 000000000000 000000000000
+       1        48      48       1 8b89697eba2c 43eadb1d2d06 000000000000
+       2        96      48       2 626a32663c2f 8b89697eba2c 000000000000
+       3       144      48       3 f54c32f13478 626a32663c2f 000000000000
+       4       192      ..       6 de68e904d169 626a32663c2f 000000000000 (re)
+       5       2..      ..       7 09bb521d218d de68e904d169 000000000000 (re)
+       6       3..      54       8 1fde233dfb0f f54c32f13478 000000000000 (re)
 
   $ hg verify
   checking changesets
--- a/tests/test-commit-amend.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-commit-amend.t	Mon Apr 02 16:28:20 2018 -0700
@@ -1161,16 +1161,16 @@
   R olddirname/commonfile.py
   R olddirname/newfile.py
   $ hg debugindex newdirname/newfile.py
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      89     -1       3 34a4d536c0c0 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      89       3 34a4d536c0c0 000000000000 000000000000
 
   $ echo a >> newdirname/commonfile.py
   $ hg ci --amend -m bug
   $ hg debugrename newdirname/newfile.py
   newdirname/newfile.py renamed from olddirname/newfile.py:690b295714aed510803d3020da9c70fca8336def
   $ hg debugindex newdirname/newfile.py
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      89     -1       3 34a4d536c0c0 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      89       3 34a4d536c0c0 000000000000 000000000000
 
 #if execbit
 
--- a/tests/test-commit.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-commit.t	Mon Apr 02 16:28:20 2018 -0700
@@ -624,9 +624,9 @@
   $ hg debugrename foo
   foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       6  .....       0 26d3ca0dfd18 000000000000 000000000000 (re)
-       1         6       7  .....       1 d267bddd54f7 26d3ca0dfd18 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       6       0 26d3ca0dfd18 000000000000 000000000000
+       1         6       7       1 d267bddd54f7 26d3ca0dfd18 000000000000
 
 Test making empty commits
   $ hg commit --config ui.allowemptycommit=True -m "empty commit"
--- a/tests/test-copy.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-copy.t	Mon Apr 02 16:28:20 2018 -0700
@@ -68,8 +68,8 @@
 this should show a revision linked to changeset 0
 
   $ hg debugindex a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b789fdd96dc2 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b789fdd96dc2 000000000000 000000000000
 
 we should see one log entry for b
 
@@ -84,8 +84,8 @@
 this should show a revision linked to changeset 1
 
   $ hg debugindex b
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      65  .....       1 37d9b5d994ea 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      65       1 37d9b5d994ea 000000000000 000000000000
 
 this should show the rename information in the metadata
 
@@ -170,8 +170,8 @@
 
 should match
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
   $ hg debugrename bar
   bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
 
@@ -200,15 +200,15 @@
 
 should show no parents for tip
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      69  .....       1 7711d36246cc 000000000000 000000000000 (re)
-       1        69       6  .....       2 bdf70a2b8d03 7711d36246cc 000000000000 (re)
-       2        75      71  .....       3 b2558327ea8d 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      69       1 7711d36246cc 000000000000 000000000000
+       1        69       6       2 bdf70a2b8d03 7711d36246cc 000000000000
+       2        75      71       3 b2558327ea8d 000000000000 000000000000
 should match
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
-       1         5       7  .....       2 dd12c926cf16 2ed2a3912a0b 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
+       1         5       7       2 dd12c926cf16 2ed2a3912a0b 000000000000
   $ hg debugrename bar
   bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
 
--- a/tests/test-debugcommands.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-debugcommands.t	Mon Apr 02 16:28:20 2018 -0700
@@ -40,17 +40,17 @@
 
 Test debugindex, with and without the --debug flag
   $ hg debugindex a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3   ....       0 b789fdd96dc2 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b789fdd96dc2 000000000000 000000000000
   $ hg --debug debugindex a
-     rev    offset  length  ..... linkrev nodeid                                   p1                                       p2 (re)
-       0         0       3   ....       0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 (re)
+     rev    offset  length linkrev nodeid                                   p1                                       p2
+       0         0       3       0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
   $ hg debugindex -f 1 a
-     rev flag   offset   length     size  .....   link     p1     p2       nodeid (re)
-       0 0000        0        3        2   ....      0     -1     -1 b789fdd96dc2 (re)
+     rev flag   offset   length     size   link     p1     p2       nodeid
+       0 0000        0        3        2      0     -1     -1 b789fdd96dc2
   $ hg --debug debugindex -f 1 a
-     rev flag   offset   length     size  .....   link     p1     p2                                   nodeid (re)
-       0 0000        0        3        2   ....      0     -1     -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (re)
+     rev flag   offset   length     size   link     p1     p2                                   nodeid
+       0 0000        0        3        2      0     -1     -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
 
 debugdelta chain basic output
 
--- a/tests/test-excessive-merge.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-excessive-merge.t	Mon Apr 02 16:28:20 2018 -0700
@@ -64,12 +64,12 @@
   summary:     test
   
   $ hg debugindex --changelog
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      60  .....       0 5e0375449e74 000000000000 000000000000 (re)
-       1        60      62  .....       1 96155394af80 5e0375449e74 000000000000 (re)
-       2       122      62  .....       2 92cc4c306b19 5e0375449e74 000000000000 (re)
-       3       184      69  .....       3 e16a66a37edd 92cc4c306b19 96155394af80 (re)
-       4       253      69  .....       4 2ee31f665a86 96155394af80 92cc4c306b19 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      60       0 5e0375449e74 000000000000 000000000000
+       1        60      62       1 96155394af80 5e0375449e74 000000000000
+       2       122      62       2 92cc4c306b19 5e0375449e74 000000000000
+       3       184      69       3 e16a66a37edd 92cc4c306b19 96155394af80
+       4       253      69       4 2ee31f665a86 96155394af80 92cc4c306b19
 
 revision 1
   $ hg manifest --debug 1
@@ -89,9 +89,9 @@
   79d7492df40aa0fa093ec4209be78043c181f094 644   b
 
   $ hg debugindex a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
-       1         5       6  .....       1 79d7492df40a 2ed2a3912a0b 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
+       1         5       6       1 79d7492df40a 2ed2a3912a0b 000000000000
 
   $ hg verify
   checking changesets
--- a/tests/test-extra-filelog-entry.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-extra-filelog-entry.t	Mon Apr 02 16:28:20 2018 -0700
@@ -16,6 +16,6 @@
   $ hg qrefresh
 
   $ hg debugindex b
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 1e88685f5dde 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 1e88685f5dde 000000000000 000000000000
 
--- a/tests/test-filebranch.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-filebranch.t	Mon Apr 02 16:28:20 2018 -0700
@@ -73,11 +73,11 @@
 main: we should have a merge here:
 
   $ hg debugindex --changelog
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      73  .....       0 cdca01651b96 000000000000 000000000000 (re)
-       1        73      68  .....       1 f6718a9cb7f3 cdca01651b96 000000000000 (re)
-       2       141      68  .....       2 bdd988058d16 cdca01651b96 000000000000 (re)
-       3       209      66  .....       3 d8a521142a3c f6718a9cb7f3 bdd988058d16 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      73       0 cdca01651b96 000000000000 000000000000
+       1        73      68       1 f6718a9cb7f3 cdca01651b96 000000000000
+       2       141      68       2 bdd988058d16 cdca01651b96 000000000000
+       3       209      66       3 d8a521142a3c f6718a9cb7f3 bdd988058d16
 
 log should show foo and quux changed:
 
@@ -97,32 +97,32 @@
 foo: we should have a merge here:
 
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       4  .....       1 2ffeddde1b65 b8e02f643373 000000000000 (re)
-       2         7       4  .....       2 33d1fb69067a b8e02f643373 000000000000 (re)
-       3        11       4  .....       3 aa27919ee430 2ffeddde1b65 33d1fb69067a (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       4       1 2ffeddde1b65 b8e02f643373 000000000000
+       2         7       4       2 33d1fb69067a b8e02f643373 000000000000
+       3        11       4       3 aa27919ee430 2ffeddde1b65 33d1fb69067a
 
 bar: we should not have a merge here:
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       4  .....       2 33d1fb69067a b8e02f643373 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       4       2 33d1fb69067a b8e02f643373 000000000000
 
 baz: we should not have a merge here:
 
   $ hg debugindex baz
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       4  .....       1 2ffeddde1b65 b8e02f643373 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       4       1 2ffeddde1b65 b8e02f643373 000000000000
 
 quux: we should not have a merge here:
 
   $ hg debugindex quux
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       5  .....       3 6128c0f33108 b8e02f643373 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       5       3 6128c0f33108 b8e02f643373 000000000000
 
 Manifest entries should match tips of all files:
 
--- a/tests/test-flags.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-flags.t	Mon Apr 02 16:28:20 2018 -0700
@@ -144,14 +144,14 @@
   -rwxr-x---
 
   $ hg debugindex a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       0  .....       0 b80de5d13875 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       0       0 b80de5d13875 000000000000 000000000000
   $ hg debugindex -R ../test2 a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       0  .....       0 b80de5d13875 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       0       0 b80de5d13875 000000000000 000000000000
   $ hg debugindex -R ../test1 a
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       0  .....       0 b80de5d13875 000000000000 000000000000 (re)
-       1         0       5  .....       1 7fe919cc0336 b80de5d13875 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       0       0 b80de5d13875 000000000000 000000000000
+       1         0       5       1 7fe919cc0336 b80de5d13875 000000000000
 
   $ cd ..
--- a/tests/test-issue522.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-issue522.t	Mon Apr 02 16:28:20 2018 -0700
@@ -48,8 +48,8 @@
   c6fc755d7e68f49f880599da29f15add41f42f5a 644   foo
 
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       5  .....       0 2ed2a3912a0b 000000000000 000000000000 (re)
-       1         5       9  .....       1 6f4310b00b9a 2ed2a3912a0b 000000000000 (re)
-       2        14       5  .....       2 c6fc755d7e68 6f4310b00b9a 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
+       1         5       9       1 6f4310b00b9a 2ed2a3912a0b 000000000000
+       2        14       5       2 c6fc755d7e68 6f4310b00b9a 000000000000
 
--- a/tests/test-merge-commit.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-merge-commit.t	Mon Apr 02 16:28:20 2018 -0700
@@ -35,17 +35,17 @@
   $ hg ci -m '3: merge with local rename'
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      77  .....       2 d35118874825 000000000000 000000000000 (re)
-       1        77      76  .....       3 5345f5ab8abd 000000000000 d35118874825 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       2 d35118874825 000000000000 000000000000
+       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
 
   $ hg debugrename bar
   bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
 
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       7  .....       0 690b295714ae 000000000000 000000000000 (re)
-       1         7      13  .....       1 9e25c27b8757 690b295714ae 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       7       0 690b295714ae 000000000000 000000000000
+       1         7      13       1 9e25c27b8757 690b295714ae 000000000000
 
 
 Revert the content change from rev 2:
@@ -88,11 +88,11 @@
   $ hg ci -m '5: merge'
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      77  .....       2 d35118874825 000000000000 000000000000 (re)
-       1        77      76  .....       3 5345f5ab8abd 000000000000 d35118874825 (re)
-       2       153       7  .....       4 ff4b45017382 d35118874825 000000000000 (re)
-       3       160      13  .....       5 3701b4893544 ff4b45017382 5345f5ab8abd (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       2 d35118874825 000000000000 000000000000
+       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
+       2       153       7       4 ff4b45017382 d35118874825 000000000000
+       3       160      13       5 3701b4893544 ff4b45017382 5345f5ab8abd
 
 
 Same thing, but with the merge on 3 having the rename
@@ -123,17 +123,17 @@
   $ hg ci -m '3: merge with remote rename'
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      77  .....       2 d35118874825 000000000000 000000000000 (re)
-       1        77      76  .....       3 5345f5ab8abd 000000000000 d35118874825 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       2 d35118874825 000000000000 000000000000
+       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
 
   $ hg debugrename bar
   bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
 
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       7  .....       0 690b295714ae 000000000000 000000000000 (re)
-       1         7      13  .....       1 9e25c27b8757 690b295714ae 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       7       0 690b295714ae 000000000000 000000000000
+       1         7      13       1 9e25c27b8757 690b295714ae 000000000000
 
 
 Revert the content change from rev 2:
@@ -176,10 +176,10 @@
   $ hg ci -m '5: merge'
 
   $ hg debugindex bar
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      77  .....       2 d35118874825 000000000000 000000000000 (re)
-       1        77      76  .....       3 5345f5ab8abd 000000000000 d35118874825 (re)
-       2       153       7  .....       4 ff4b45017382 d35118874825 000000000000 (re)
-       3       160      13  .....       5 3701b4893544 ff4b45017382 5345f5ab8abd (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       2 d35118874825 000000000000 000000000000
+       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
+       2       153       7       4 ff4b45017382 d35118874825 000000000000
+       3       160      13       5 3701b4893544 ff4b45017382 5345f5ab8abd
 
   $ cd ..
--- a/tests/test-merge7.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-merge7.t	Mon Apr 02 16:28:20 2018 -0700
@@ -109,12 +109,12 @@
   three
 
   $ hg debugindex test.txt
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       7  .....       0 01365c4cca56 000000000000 000000000000 (re)
-       1         7       9  .....       1 7b013192566a 01365c4cca56 000000000000 (re)
-       2        16      15  .....       2 8fe46a3eb557 01365c4cca56 000000000000 (re)
-       3        31      2.  .....       3 fc3148072371 7b013192566a 8fe46a3eb557 (re)
-       4        5.      25  .....       4 d40249267ae3 8fe46a3eb557 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       7       0 01365c4cca56 000000000000 000000000000
+       1         7       9       1 7b013192566a 01365c4cca56 000000000000
+       2        16      15       2 8fe46a3eb557 01365c4cca56 000000000000
+       3        31      2.       3 fc3148072371 7b013192566a 8fe46a3eb557 (re)
+       4        5.      25       4 d40249267ae3 8fe46a3eb557 000000000000 (re)
 
   $ hg log
   changeset:   4:40d11a4173a8
--- a/tests/test-narrow-debugcommands.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-narrow-debugcommands.t	Mon Apr 02 16:28:20 2018 -0700
@@ -15,20 +15,20 @@
   adding foo/bar/f
   adding foo/f
   $ hg debugindex -m
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      47     -1       0 14a5d056d75a 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      47       0 14a5d056d75a 000000000000 000000000000
   $ hg debugindex --dir foo
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      77     -1       0 e635c7857aef 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       0 e635c7857aef 000000000000 000000000000
   $ hg debugindex --dir foo/
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      77     -1       0 e635c7857aef 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      77       0 e635c7857aef 000000000000 000000000000
   $ hg debugindex --dir foo/bar
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      44     -1       0 e091d4224761 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      44       0 e091d4224761 000000000000 000000000000
   $ hg debugindex --dir foo/bar/
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      44     -1       0 e091d4224761 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      44       0 e091d4224761 000000000000 000000000000
   $ hg debugdata -m 0
   foo\x00e635c7857aef92ac761ce5741a99da159abbbb24t (esc)
   $ hg debugdata --dir foo 0
--- a/tests/test-narrow-update.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-narrow-update.t	Mon Apr 02 16:28:20 2018 -0700
@@ -33,11 +33,11 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd narrow
   $ hg debugindex -c
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      64      0       0 9958b1af2add 000000000000 000000000000
-       1        64      81      1       1 2db4ce2a3bfe 9958b1af2add 000000000000
-       2       145      75      2       2 0980ee31a742 2db4ce2a3bfe 000000000000
-       3       220      (76|77)      3       3 4410145019b7 0980ee31a742 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      64       0 9958b1af2add 000000000000 000000000000
+       1        64      81       1 2db4ce2a3bfe 9958b1af2add 000000000000
+       2       145      75       2 0980ee31a742 2db4ce2a3bfe 000000000000
+       3       220      (76|77)       3 4410145019b7 0980ee31a742 000000000000 (re)
 
   $ hg update -q 0
 
--- a/tests/test-parseindex.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-parseindex.t	Mon Apr 02 16:28:20 2018 -0700
@@ -144,9 +144,9 @@
   > EOF
 
   $ hg -R limit debugindex -f1 -c
-     rev flag   offset   length     size   base   link     p1     p2       nodeid
-       0 0000        0       63       62      0      0      2     -1 7c31755bf9b5
-       1 0000       63       66       65      1      1      0      2 26333235a41c
+     rev flag   offset   length     size   link     p1     p2       nodeid
+       0 0000        0       63       62      0      2     -1 7c31755bf9b5
+       1 0000       63       66       65      1      0      2 26333235a41c
 
   $ hg -R limit debugdeltachain -c
       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
@@ -154,9 +154,9 @@
         1       2        1       -1    base         66         65         66   1.01538        66         0    0.00000
 
   $ hg -R segv debugindex -f1 -c
-     rev flag   offset   length     size   base   link     p1     p2       nodeid
-       0 0000        0       63       62      0      0  65536     -1 7c31755bf9b5
-       1 0000       63       66       65      1      1      0  65536 26333235a41c
+     rev flag   offset   length     size   link     p1     p2       nodeid
+       0 0000        0       63       62      0  65536     -1 7c31755bf9b5
+       1 0000       63       66       65      1      0  65536 26333235a41c
 
   $ hg -R segv debugdeltachain -c
       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
--- a/tests/test-rename-merge1.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-rename-merge1.t	Mon Apr 02 16:28:20 2018 -0700
@@ -64,9 +64,9 @@
   $ hg ci -m "merge"
 
   $ hg debugindex b
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0      67  .....       1 57eacc201a7f 000000000000 000000000000 (re)
-       1        67      72  .....       3 4727ba907962 000000000000 57eacc201a7f (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      67       1 57eacc201a7f 000000000000 000000000000
+       1        67      72       3 4727ba907962 000000000000 57eacc201a7f
 
   $ hg debugrename b
   b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
--- a/tests/test-revlog-packentry.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-revlog-packentry.t	Mon Apr 02 16:28:20 2018 -0700
@@ -16,8 +16,8 @@
   created new head
 
   $ hg debugindex foo
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       0  .....       0 b80de5d13875 000000000000 000000000000 (re)
-       1         0      13  .....       1 0376abec49b8 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       0       0 b80de5d13875 000000000000 000000000000
+       1         0      13       1 0376abec49b8 000000000000 000000000000
 
   $ cd ..
--- a/tests/test-revlog.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-revlog.t	Mon Apr 02 16:28:20 2018 -0700
@@ -40,8 +40,8 @@
   ... .decode("base64").decode("zlib"))
 
   $ hg debugindex a.i
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      19     -1       2 99e0332bd498 000000000000 000000000000
-       1        19      12      0       3 6674f57a23d8 99e0332bd498 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      19       2 99e0332bd498 000000000000 000000000000
+       1        19      12       3 6674f57a23d8 99e0332bd498 000000000000
   $ hg debugdata a.i 1 2>&1 | egrep 'Error:.*decoded'
   (mercurial\.\w+\.mpatch\.)?mpatchError: patch cannot be decoded (re)
--- a/tests/test-strip-cross.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-strip-cross.t	Mon Apr 02 16:28:20 2018 -0700
@@ -34,12 +34,12 @@
   $ hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed
   $ cd crossed
   $ hg debugindex --manifest
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0     112  .....       0 6f105cbb914d 000000000000 000000000000 (re)
-       1       112      56  .....       3 1b55917b3699 000000000000 000000000000 (re)
-       2       168     123  .....       1 8f3d04e263e5 000000000000 000000000000 (re)
-       3       291     122  .....       2 f0ef8726ac4f 000000000000 000000000000 (re)
-       4       413      87  .....       4 0b76e38b4070 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0     112       0 6f105cbb914d 000000000000 000000000000
+       1       112      56       3 1b55917b3699 000000000000 000000000000
+       2       168     123       1 8f3d04e263e5 000000000000 000000000000
+       3       291     122       2 f0ef8726ac4f 000000000000 000000000000
+       4       413      87       4 0b76e38b4070 000000000000 000000000000
 
   $ for i in 012 021 102 120 201 210 manifest-file; do
   >     echo $i
@@ -47,45 +47,45 @@
   >     echo
   > done
   012
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       1 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       2 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       3       1 5d9299349fc0 000000000000 000000000000
+       2         6       3       2 2661d26c6496 000000000000 000000000000
   
   021
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       0 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       2 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       1 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       0 b8e02f643373 000000000000 000000000000
+       1         3       3       2 5d9299349fc0 000000000000 000000000000
+       2         6       3       1 2661d26c6496 000000000000 000000000000
   
   102
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       1 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       0 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       2 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       1 b8e02f643373 000000000000 000000000000
+       1         3       3       0 5d9299349fc0 000000000000 000000000000
+       2         6       3       2 2661d26c6496 000000000000 000000000000
   
   120
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       1 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       2 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       0 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       1 b8e02f643373 000000000000 000000000000
+       1         3       3       2 5d9299349fc0 000000000000 000000000000
+       2         6       3       0 2661d26c6496 000000000000 000000000000
   
   201
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       2 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       0 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       1 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       2 b8e02f643373 000000000000 000000000000
+       1         3       3       0 5d9299349fc0 000000000000 000000000000
+       2         6       3       1 2661d26c6496 000000000000 000000000000
   
   210
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       2 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       1 5d9299349fc0 000000000000 000000000000 (re)
-       2         6       3  .....       0 2661d26c6496 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       2 b8e02f643373 000000000000 000000000000
+       1         3       3       1 5d9299349fc0 000000000000 000000000000
+       2         6       3       0 2661d26c6496 000000000000 000000000000
   
   manifest-file
-     rev    offset  length  ..... linkrev nodeid       p1           p2 (re)
-       0         0       3  .....       3 b8e02f643373 000000000000 000000000000 (re)
-       1         3       3  .....       4 5d9299349fc0 000000000000 000000000000 (re)
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0       3       3 b8e02f643373 000000000000 000000000000
+       1         3       3       4 5d9299349fc0 000000000000 000000000000
   
   $ cd ..
   $ for i in 0 1 2 3 4; do
--- a/tests/test-treemanifest.t	Mon Apr 02 16:24:57 2018 -0700
+++ b/tests/test-treemanifest.t	Mon Apr 02 16:28:20 2018 -0700
@@ -139,13 +139,13 @@
   $ cat dir1/b
   6
   $ hg debugindex --dir dir1
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      54     -1       1 8b3ffd73f901 000000000000 000000000000
-       1        54      68      0       2 68e9d057c5a8 8b3ffd73f901 000000000000
-       2       122      12      1       4 4698198d2624 68e9d057c5a8 000000000000
-       3       134      55      1       5 44844058ccce 68e9d057c5a8 000000000000
-       4       189      55      1       6 bf3d9b744927 68e9d057c5a8 000000000000
-       5       244      55      4       7 dde7c0af2a03 bf3d9b744927 44844058ccce
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      54       1 8b3ffd73f901 000000000000 000000000000
+       1        54      68       2 68e9d057c5a8 8b3ffd73f901 000000000000
+       2       122      12       4 4698198d2624 68e9d057c5a8 000000000000
+       3       134      55       5 44844058ccce 68e9d057c5a8 000000000000
+       4       189      55       6 bf3d9b744927 68e9d057c5a8 000000000000
+       5       244      55       7 dde7c0af2a03 bf3d9b744927 44844058ccce
 
 Merge keeping directory from parent 1 does not create revlog entry. (Note that
 dir1's manifest does change, but only because dir1/a's filelog changes.)
@@ -285,13 +285,13 @@
 Parent of tree root manifest should be flat manifest, and two for merge
 
   $ hg debugindex -m
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0      80     -1       0 40536115ed9e 000000000000 000000000000
-       1        80      83      0       1 f3376063c255 40536115ed9e 000000000000
-       2       163      89      0       2 5d9b9da231a2 40536115ed9e 000000000000
-       3       252      83      2       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
-       4       335     124      1       4 51e32a8c60ee f3376063c255 000000000000
-       5       459     126      2       5 cc5baa78b230 5d9b9da231a2 f3376063c255
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0      80       0 40536115ed9e 000000000000 000000000000
+       1        80      83       1 f3376063c255 40536115ed9e 000000000000
+       2       163      89       2 5d9b9da231a2 40536115ed9e 000000000000
+       3       252      83       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
+       4       335     124       4 51e32a8c60ee f3376063c255 000000000000
+       5       459     126       5 cc5baa78b230 5d9b9da231a2 f3376063c255
 
 
 Status across flat/tree boundary should work
@@ -305,16 +305,16 @@
 Turning off treemanifest config has no effect
 
   $ hg debugindex --dir dir1
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0     127     -1       4 064927a0648a 000000000000 000000000000
-       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0     127       4 064927a0648a 000000000000 000000000000
+       1       127     111       5 25ecb8cb8618 000000000000 000000000000
   $ echo 2 > dir1/a
   $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
   $ hg debugindex --dir dir1
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0     127     -1       4 064927a0648a 000000000000 000000000000
-       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
-       2       238      55      1       6 5b16163a30c6 25ecb8cb8618 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0     127       4 064927a0648a 000000000000 000000000000
+       1       127     111       5 25ecb8cb8618 000000000000 000000000000
+       2       238      55       6 5b16163a30c6 25ecb8cb8618 000000000000
 
 Stripping and recovering changes should work
 
@@ -324,9 +324,9 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
   $ hg debugindex --dir dir1
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0     127     -1       4 064927a0648a 000000000000 000000000000
-       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0     127       4 064927a0648a 000000000000 000000000000
+       1       127     111       5 25ecb8cb8618 000000000000 000000000000
   $ hg incoming .hg/strip-backup/*
   comparing with .hg/strip-backup/*-backup.hg (glob)
   searching for changes
@@ -349,10 +349,10 @@
   saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob)
   $ hg unbundle -q .hg/strip-backup/*
   $ hg debugindex --dir dir1
-     rev    offset  length  delta linkrev nodeid       p1           p2
-       0         0     127     -1       4 064927a0648a 000000000000 000000000000
-       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
-       2       238      55      1       6 5b16163a30c6 25ecb8cb8618 000000000000
+     rev    offset  length linkrev nodeid       p1           p2
+       0         0     127       4 064927a0648a 000000000000 000000000000
+       1       127     111       5 25ecb8cb8618 000000000000 000000000000
+       2       238      55       6 5b16163a30c6 25ecb8cb8618 000000000000
   $ hg st --change tip
   M dir1/a