Patchwork D3028: debugcommands: drop offset and length from debugindex by default

login
register
mail settings
Submitter phabricator
Date April 3, 2018, 4:51 p.m.
Message ID <9c8b111ea5453ba10025a0a04f4ef41a@localhost.localdomain>
Download mbox | patch
Permalink /patch/30187/
State Not Applicable
Headers show

Comments

phabricator - April 3, 2018, 4:51 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd4e62df1c73d: debugcommands: drop offset and length from debugindex by default (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3028?vs=7529&id=7546

REVISION DETAIL
  https://phab.mercurial-scm.org/D3028

AFFECTED FILES
  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

CHANGE DETAILS




To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -139,13 +139,13 @@ 
   $ cat dir1/b
   6
   $ hg debugindex --dir dir1
-     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
+     rev linkrev nodeid       p1           p2
+       0       1 8b3ffd73f901 000000000000 000000000000
+       1       2 68e9d057c5a8 8b3ffd73f901 000000000000
+       2       4 4698198d2624 68e9d057c5a8 000000000000
+       3       5 44844058ccce 68e9d057c5a8 000000000000
+       4       6 bf3d9b744927 68e9d057c5a8 000000000000
+       5       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 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
+     rev linkrev nodeid       p1           p2
+       0       0 40536115ed9e 000000000000 000000000000
+       1       1 f3376063c255 40536115ed9e 000000000000
+       2       2 5d9b9da231a2 40536115ed9e 000000000000
+       3       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
+       4       4 51e32a8c60ee f3376063c255 000000000000
+       5       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 linkrev nodeid       p1           p2
-       0         0     127       4 064927a0648a 000000000000 000000000000
-       1       127     111       5 25ecb8cb8618 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       4 064927a0648a 000000000000 000000000000
+       1       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 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
+     rev linkrev nodeid       p1           p2
+       0       4 064927a0648a 000000000000 000000000000
+       1       5 25ecb8cb8618 000000000000 000000000000
+       2       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 linkrev nodeid       p1           p2
-       0         0     127       4 064927a0648a 000000000000 000000000000
-       1       127     111       5 25ecb8cb8618 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       4 064927a0648a 000000000000 000000000000
+       1       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 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
+     rev linkrev nodeid       p1           p2
+       0       4 064927a0648a 000000000000 000000000000
+       1       5 25ecb8cb8618 000000000000 000000000000
+       2       6 5b16163a30c6 25ecb8cb8618 000000000000
   $ hg st --change tip
   M dir1/a
 
diff --git a/tests/test-strip-cross.t b/tests/test-strip-cross.t
--- a/tests/test-strip-cross.t
+++ b/tests/test-strip-cross.t
@@ -34,58 +34,58 @@ 
   $ 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
-       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
+     rev linkrev nodeid       p1           p2
+       0       0 6f105cbb914d 000000000000 000000000000
+       1       3 1b55917b3699 000000000000 000000000000
+       2       1 8f3d04e263e5 000000000000 000000000000
+       3       2 f0ef8726ac4f 000000000000 000000000000
+       4       4 0b76e38b4070 000000000000 000000000000
 
   $ for i in 012 021 102 120 201 210 manifest-file; do
   >     echo $i
   >     hg debugindex $i
   >     echo
   > done
   012
-     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
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       1 5d9299349fc0 000000000000 000000000000
+       2       2 2661d26c6496 000000000000 000000000000
   
   021
-     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
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       2 5d9299349fc0 000000000000 000000000000
+       2       1 2661d26c6496 000000000000 000000000000
   
   102
-     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
+     rev linkrev nodeid       p1           p2
+       0       1 b8e02f643373 000000000000 000000000000
+       1       0 5d9299349fc0 000000000000 000000000000
+       2       2 2661d26c6496 000000000000 000000000000
   
   120
-     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
+     rev linkrev nodeid       p1           p2
+       0       1 b8e02f643373 000000000000 000000000000
+       1       2 5d9299349fc0 000000000000 000000000000
+       2       0 2661d26c6496 000000000000 000000000000
   
   201
-     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
+     rev linkrev nodeid       p1           p2
+       0       2 b8e02f643373 000000000000 000000000000
+       1       0 5d9299349fc0 000000000000 000000000000
+       2       1 2661d26c6496 000000000000 000000000000
   
   210
-     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
+     rev linkrev nodeid       p1           p2
+       0       2 b8e02f643373 000000000000 000000000000
+       1       1 5d9299349fc0 000000000000 000000000000
+       2       0 2661d26c6496 000000000000 000000000000
   
   manifest-file
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       3 b8e02f643373 000000000000 000000000000
-       1         3       3       4 5d9299349fc0 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       3 b8e02f643373 000000000000 000000000000
+       1       4 5d9299349fc0 000000000000 000000000000
   
   $ cd ..
   $ for i in 0 1 2 3 4; do
diff --git a/tests/test-revlog.t b/tests/test-revlog.t
--- a/tests/test-revlog.t
+++ b/tests/test-revlog.t
@@ -40,8 +40,8 @@ 
   ... .decode("base64").decode("zlib"))
 
   $ hg debugindex a.i
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      19       2 99e0332bd498 000000000000 000000000000
-       1        19      12       3 6674f57a23d8 99e0332bd498 000000000000
+     rev linkrev nodeid       p1           p2
+       0       2 99e0332bd498 000000000000 000000000000
+       1       3 6674f57a23d8 99e0332bd498 000000000000
   $ hg debugdata a.i 1 2>&1 | egrep 'Error:.*decoded'
   (mercurial\.\w+\.mpatch\.)?mpatchError: patch cannot be decoded (re)
diff --git a/tests/test-revlog-packentry.t b/tests/test-revlog-packentry.t
--- a/tests/test-revlog-packentry.t
+++ b/tests/test-revlog-packentry.t
@@ -16,8 +16,8 @@ 
   created new head
 
   $ hg debugindex foo
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       0       0 b80de5d13875 000000000000 000000000000
-       1         0      13       1 0376abec49b8 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b80de5d13875 000000000000 000000000000
+       1       1 0376abec49b8 000000000000 000000000000
 
   $ cd ..
diff --git a/tests/test-rename-merge1.t b/tests/test-rename-merge1.t
--- a/tests/test-rename-merge1.t
+++ b/tests/test-rename-merge1.t
@@ -64,9 +64,9 @@ 
   $ hg ci -m "merge"
 
   $ hg debugindex b
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      67       1 57eacc201a7f 000000000000 000000000000
-       1        67      72       3 4727ba907962 000000000000 57eacc201a7f
+     rev linkrev nodeid       p1           p2
+       0       1 57eacc201a7f 000000000000 000000000000
+       1       3 4727ba907962 000000000000 57eacc201a7f
 
   $ hg debugrename b
   b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t
--- a/tests/test-parseindex.t
+++ b/tests/test-parseindex.t
@@ -144,19 +144,19 @@ 
   > EOF
 
   $ hg -R limit debugindex -f1 -c
-     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
+     rev flag     size   link     p1     p2       nodeid
+       0 0000       62      0      2     -1 7c31755bf9b5
+       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
 
   $ hg -R segv debugindex -f1 -c
-     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
+     rev flag     size   link     p1     p2       nodeid
+       0 0000       62      0  65536     -1 7c31755bf9b5
+       1 0000       65      1      0  65536 26333235a41c
 
   $ hg -R segv debugdeltachain -c
       rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
diff --git a/tests/test-narrow-update.t b/tests/test-narrow-update.t
--- a/tests/test-narrow-update.t
+++ b/tests/test-narrow-update.t
@@ -33,11 +33,11 @@ 
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd narrow
   $ hg debugindex -c
-     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)
+     rev linkrev nodeid       p1           p2
+       0       0 9958b1af2add 000000000000 000000000000
+       1       1 2db4ce2a3bfe 9958b1af2add 000000000000
+       2       2 0980ee31a742 2db4ce2a3bfe 000000000000
+       3       3 4410145019b7 0980ee31a742 000000000000
 
   $ hg update -q 0
 
diff --git a/tests/test-narrow-debugcommands.t b/tests/test-narrow-debugcommands.t
--- a/tests/test-narrow-debugcommands.t
+++ b/tests/test-narrow-debugcommands.t
@@ -15,20 +15,20 @@ 
   adding foo/bar/f
   adding foo/f
   $ hg debugindex -m
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      47       0 14a5d056d75a 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 14a5d056d75a 000000000000 000000000000
   $ hg debugindex --dir foo
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      77       0 e635c7857aef 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 e635c7857aef 000000000000 000000000000
   $ hg debugindex --dir foo/
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      77       0 e635c7857aef 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 e635c7857aef 000000000000 000000000000
   $ hg debugindex --dir foo/bar
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      44       0 e091d4224761 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 e091d4224761 000000000000 000000000000
   $ hg debugindex --dir foo/bar/
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      44       0 e091d4224761 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 e091d4224761 000000000000 000000000000
   $ hg debugdata -m 0
   foo\x00e635c7857aef92ac761ce5741a99da159abbbb24t (esc)
   $ hg debugdata --dir foo 0
diff --git a/tests/test-merge7.t b/tests/test-merge7.t
--- a/tests/test-merge7.t
+++ b/tests/test-merge7.t
@@ -109,12 +109,12 @@ 
   three
 
   $ hg debugindex test.txt
-     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)
+     rev linkrev nodeid       p1           p2
+       0       0 01365c4cca56 000000000000 000000000000
+       1       1 7b013192566a 01365c4cca56 000000000000
+       2       2 8fe46a3eb557 01365c4cca56 000000000000
+       3       3 fc3148072371 7b013192566a 8fe46a3eb557
+       4       4 d40249267ae3 8fe46a3eb557 000000000000
 
   $ hg log
   changeset:   4:40d11a4173a8
diff --git a/tests/test-merge-commit.t b/tests/test-merge-commit.t
--- a/tests/test-merge-commit.t
+++ b/tests/test-merge-commit.t
@@ -35,17 +35,17 @@ 
   $ hg ci -m '3: merge with local rename'
 
   $ hg debugindex bar
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      77       2 d35118874825 000000000000 000000000000
-       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
+     rev linkrev nodeid       p1           p2
+       0       2 d35118874825 000000000000 000000000000
+       1       3 5345f5ab8abd 000000000000 d35118874825
 
   $ hg debugrename bar
   bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
 
   $ hg debugindex foo
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       7       0 690b295714ae 000000000000 000000000000
-       1         7      13       1 9e25c27b8757 690b295714ae 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 690b295714ae 000000000000 000000000000
+       1       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
-       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
+     rev linkrev nodeid       p1           p2
+       0       2 d35118874825 000000000000 000000000000
+       1       3 5345f5ab8abd 000000000000 d35118874825
+       2       4 ff4b45017382 d35118874825 000000000000
+       3       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
-       0         0      77       2 d35118874825 000000000000 000000000000
-       1        77      76       3 5345f5ab8abd 000000000000 d35118874825
+     rev linkrev nodeid       p1           p2
+       0       2 d35118874825 000000000000 000000000000
+       1       3 5345f5ab8abd 000000000000 d35118874825
 
   $ hg debugrename bar
   bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
 
   $ hg debugindex foo
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       7       0 690b295714ae 000000000000 000000000000
-       1         7      13       1 9e25c27b8757 690b295714ae 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 690b295714ae 000000000000 000000000000
+       1       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
-       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
+     rev linkrev nodeid       p1           p2
+       0       2 d35118874825 000000000000 000000000000
+       1       3 5345f5ab8abd 000000000000 d35118874825
+       2       4 ff4b45017382 d35118874825 000000000000
+       3       5 3701b4893544 ff4b45017382 5345f5ab8abd
 
   $ cd ..
diff --git a/tests/test-issue522.t b/tests/test-issue522.t
--- a/tests/test-issue522.t
+++ b/tests/test-issue522.t
@@ -48,8 +48,8 @@ 
   c6fc755d7e68f49f880599da29f15add41f42f5a 644   foo
 
   $ hg debugindex foo
-     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
+     rev linkrev nodeid       p1           p2
+       0       0 2ed2a3912a0b 000000000000 000000000000
+       1       1 6f4310b00b9a 2ed2a3912a0b 000000000000
+       2       2 c6fc755d7e68 6f4310b00b9a 000000000000
 
diff --git a/tests/test-flags.t b/tests/test-flags.t
--- a/tests/test-flags.t
+++ b/tests/test-flags.t
@@ -144,14 +144,14 @@ 
   -rwxr-x---
 
   $ hg debugindex a
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       0       0 b80de5d13875 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b80de5d13875 000000000000 000000000000
   $ hg debugindex -R ../test2 a
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       0       0 b80de5d13875 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b80de5d13875 000000000000 000000000000
   $ hg debugindex -R ../test1 a
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       0       0 b80de5d13875 000000000000 000000000000
-       1         0       5       1 7fe919cc0336 b80de5d13875 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b80de5d13875 000000000000 000000000000
+       1       1 7fe919cc0336 b80de5d13875 000000000000
 
   $ cd ..
diff --git a/tests/test-filebranch.t b/tests/test-filebranch.t
--- a/tests/test-filebranch.t
+++ b/tests/test-filebranch.t
@@ -73,11 +73,11 @@ 
 main: we should have a merge here:
 
   $ hg debugindex --changelog
-     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
+     rev linkrev nodeid       p1           p2
+       0       0 cdca01651b96 000000000000 000000000000
+       1       1 f6718a9cb7f3 cdca01651b96 000000000000
+       2       2 bdd988058d16 cdca01651b96 000000000000
+       3       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
-       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
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       1 2ffeddde1b65 b8e02f643373 000000000000
+       2       2 33d1fb69067a b8e02f643373 000000000000
+       3       3 aa27919ee430 2ffeddde1b65 33d1fb69067a
 
 bar: we should not have a merge here:
 
   $ hg debugindex bar
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       0 b8e02f643373 000000000000 000000000000
-       1         3       4       2 33d1fb69067a b8e02f643373 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       2 33d1fb69067a b8e02f643373 000000000000
 
 baz: we should not have a merge here:
 
   $ hg debugindex baz
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       0 b8e02f643373 000000000000 000000000000
-       1         3       4       1 2ffeddde1b65 b8e02f643373 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       1 2ffeddde1b65 b8e02f643373 000000000000
 
 quux: we should not have a merge here:
 
   $ hg debugindex quux
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       0 b8e02f643373 000000000000 000000000000
-       1         3       5       3 6128c0f33108 b8e02f643373 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 b8e02f643373 000000000000 000000000000
+       1       3 6128c0f33108 b8e02f643373 000000000000
 
 Manifest entries should match tips of all files:
 
diff --git a/tests/test-extra-filelog-entry.t b/tests/test-extra-filelog-entry.t
--- a/tests/test-extra-filelog-entry.t
+++ b/tests/test-extra-filelog-entry.t
@@ -16,6 +16,6 @@ 
   $ hg qrefresh
 
   $ hg debugindex b
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       0 1e88685f5dde 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 1e88685f5dde 000000000000 000000000000
 
diff --git a/tests/test-excessive-merge.t b/tests/test-excessive-merge.t
--- a/tests/test-excessive-merge.t
+++ b/tests/test-excessive-merge.t
@@ -64,12 +64,12 @@ 
   summary:     test
   
   $ hg debugindex --changelog
-     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
+     rev linkrev nodeid       p1           p2
+       0       0 5e0375449e74 000000000000 000000000000
+       1       1 96155394af80 5e0375449e74 000000000000
+       2       2 92cc4c306b19 5e0375449e74 000000000000
+       3       3 e16a66a37edd 92cc4c306b19 96155394af80
+       4       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
-       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
-       1         5       6       1 79d7492df40a 2ed2a3912a0b 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 2ed2a3912a0b 000000000000 000000000000
+       1       1 79d7492df40a 2ed2a3912a0b 000000000000
 
   $ hg verify
   checking changesets
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -38,16 +38,27 @@ 
   full revision size (min/max/avg)     : 44 / 44 / 44
   delta size (min/max/avg)             : 0 / 0 / 0
 
-Test debugindex, with and without the --debug flag
+Test debugindex, with and without the --verbose/--debug flag
   $ hg debugindex a
+     rev linkrev nodeid       p1           p2
+       0       0 b789fdd96dc2 000000000000 000000000000
+
+  $ hg --verbose debugindex a
      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
        0         0       3       0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
+
   $ hg debugindex -f 1 a
+     rev flag     size   link     p1     p2       nodeid
+       0 0000        2      0     -1     -1 b789fdd96dc2
+
+  $ hg --verbose debugindex -f 1 a
      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
        0 0000        0        3        2      0     -1     -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
diff --git a/tests/test-copy.t b/tests/test-copy.t
--- a/tests/test-copy.t
+++ b/tests/test-copy.t
@@ -68,8 +68,8 @@ 
 this should show a revision linked to changeset 0
 
   $ hg debugindex a
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       3       0 b789fdd96dc2 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       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
-       0         0      65       1 37d9b5d994ea 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       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
-       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       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
-       0         0      69       1 7711d36246cc 000000000000 000000000000
-       1        69       6       2 bdf70a2b8d03 7711d36246cc 000000000000
-       2        75      71       3 b2558327ea8d 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       1 7711d36246cc 000000000000 000000000000
+       1       2 bdf70a2b8d03 7711d36246cc 000000000000
+       2       3 b2558327ea8d 000000000000 000000000000
 should match
   $ hg debugindex foo
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       5       0 2ed2a3912a0b 000000000000 000000000000
-       1         5       7       2 dd12c926cf16 2ed2a3912a0b 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 2ed2a3912a0b 000000000000 000000000000
+       1       2 dd12c926cf16 2ed2a3912a0b 000000000000
   $ hg debugrename bar
   bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
 
diff --git a/tests/test-commit.t b/tests/test-commit.t
--- a/tests/test-commit.t
+++ b/tests/test-commit.t
@@ -624,9 +624,9 @@ 
   $ hg debugrename foo
   foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
   $ hg debugindex bar
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       6       0 26d3ca0dfd18 000000000000 000000000000
-       1         6       7       1 d267bddd54f7 26d3ca0dfd18 000000000000
+     rev linkrev nodeid       p1           p2
+       0       0 26d3ca0dfd18 000000000000 000000000000
+       1       1 d267bddd54f7 26d3ca0dfd18 000000000000
 
 Test making empty commits
   $ hg commit --config ui.allowemptycommit=True -m "empty commit"
diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
--- a/tests/test-commit-amend.t
+++ b/tests/test-commit-amend.t
@@ -1161,16 +1161,16 @@ 
   R olddirname/commonfile.py
   R olddirname/newfile.py
   $ hg debugindex newdirname/newfile.py
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      89       3 34a4d536c0c0 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       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 linkrev nodeid       p1           p2
-       0         0      89       3 34a4d536c0c0 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       3 34a4d536c0c0 000000000000 000000000000
 
 #if execbit
 
diff --git a/tests/test-clone-r.t b/tests/test-clone-r.t
--- a/tests/test-clone-r.t
+++ b/tests/test-clone-r.t
@@ -38,33 +38,33 @@ 
   $ hg commit -m "0.3m"
 
   $ hg debugindex -f 1 afile
-     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
+     rev flag     size   link     p1     p2       nodeid
+       0 0000        2      0     -1     -1 362fef284ce2
+       1 0000        4      1      0     -1 125144f7e028
+       2 0000        6      2      1     -1 4c982badb186
+       3 0000        8      3      2     -1 19b1fc555737
 
   $ hg debugindex adifferentfile
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      75       7 2565f3199a74 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       7 2565f3199a74 000000000000 000000000000
 
   $ hg debugindex anotherfile
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0      75       8 2565f3199a74 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       8 2565f3199a74 000000000000 000000000000
 
   $ hg debugindex fred
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       8       6 12ab3bcc5ea4 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       6 12ab3bcc5ea4 000000000000 000000000000
 
   $ hg debugindex --manifest
-     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)
+     rev linkrev nodeid       p1           p2
+       0       0 43eadb1d2d06 000000000000 000000000000
+       1       1 8b89697eba2c 43eadb1d2d06 000000000000
+       2       2 626a32663c2f 8b89697eba2c 000000000000
+       3       3 f54c32f13478 626a32663c2f 000000000000
+       4       6 de68e904d169 626a32663c2f 000000000000
+       5       7 09bb521d218d de68e904d169 000000000000
+       6       8 1fde233dfb0f f54c32f13478 000000000000
 
   $ hg verify
   checking changesets
diff --git a/tests/test-changelog-exec.t b/tests/test-changelog-exec.t
--- a/tests/test-changelog-exec.t
+++ b/tests/test-changelog-exec.t
@@ -51,7 +51,7 @@ 
   
 
   $ hg debugindex bar
-     rev    offset  length linkrev nodeid       p1           p2
-       0         0       5       1 b004912a8510 000000000000 000000000000
+     rev linkrev nodeid       p1           p2
+       0       1 b004912a8510 000000000000 000000000000
 
   $ cd ..
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1071,27 +1071,46 @@ 
         break
 
     if format == 0:
-        ui.write(("   rev    offset  length linkrev"
-                 " %s %s p2\n") % ("nodeid".ljust(idlen), "p1".ljust(idlen)))
+        if ui.verbose:
+            ui.write(("   rev    offset  length linkrev"
+                     " %s %s p2\n") % ("nodeid".ljust(idlen),
+                                       "p1".ljust(idlen)))
+        else:
+            ui.write(("   rev linkrev %s %s p2\n") % (
+                "nodeid".ljust(idlen), "p1".ljust(idlen)))
     elif format == 1:
-        ui.write(("   rev flag   offset   length     size   link     p1     p2"
-                 " %s\n") % "nodeid".rjust(idlen))
+        if ui.verbose:
+            ui.write(("   rev flag   offset   length     size   link     p1"
+                      "     p2 %s\n") % "nodeid".rjust(idlen))
+        else:
+            ui.write(("   rev flag     size   link     p1     p2 %s\n") %
+                     "nodeid".rjust(idlen))
 
     for i in r:
         node = r.node(i)
         if format == 0:
             try:
                 pp = r.parents(node)
             except Exception:
                 pp = [nullid, nullid]
-            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])))
+            if ui.verbose:
+                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])))
+            else:
+                ui.write("% 6d % 7d %s %s %s\n" % (
+                    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 %s\n" % (
-                    i, r.flags(i), r.start(i), r.length(i), r.rawsize(i),
-                    r.linkrev(i), pr[0], pr[1], shortfn(node)))
+            if ui.verbose:
+                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),
+                        r.linkrev(i), pr[0], pr[1], shortfn(node)))
+            else:
+                ui.write("% 6d %04x % 8d % 6d % 6d % 6d %s\n" % (
+                    i, r.flags(i), r.rawsize(i), r.linkrev(i), pr[0], pr[1],
+                    shortfn(node)))
 
 @command('debugindexdot', cmdutil.debugrevlogopts,
     _('-c|-m|FILE'), optionalrepo=True)