# HG changeset patch # User Gregory Szorc # Date 1534798865 0 # Node ID cb9cf42c902fc752e9bea68fcfef14d8fcb3e172 # Parent 53e532007878f30ad7f4215a472fa75602e48f8f debugcommands: use openstorage() in debugindexdot And add test coverage for changelog and manifests. Differential Revision: https://phab.mercurial-scm.org/D4355 diff -r 53e532007878 -r cb9cf42c902f mercurial/debugcommands.py --- a/mercurial/debugcommands.py Tue Aug 14 16:28:21 2018 +0000 +++ b/mercurial/debugcommands.py Mon Aug 20 21:01:05 2018 +0000 @@ -1178,7 +1178,7 @@ def debugindexdot(ui, repo, file_=None, **opts): """dump an index DAG as a graphviz dot file""" opts = pycompat.byteskwargs(opts) - r = cmdutil.openrevlog(repo, 'debugindexdot', file_, opts) + r = cmdutil.openstorage(repo, 'debugindexdot', file_, opts) ui.write(("digraph G {\n")) for i in r: node = r.node(i) diff -r 53e532007878 -r cb9cf42c902f tests/test-debugindexdot.t --- a/tests/test-debugindexdot.t Tue Aug 14 16:28:21 2018 +0000 +++ b/tests/test-debugindexdot.t Mon Aug 20 21:01:05 2018 +0000 @@ -13,6 +13,24 @@ $ HGMERGE=true hg merge -q $ hg ci -m merge -d '3 0' + $ hg debugindexdot -c + digraph G { + -1 -> 0 + 0 -> 1 + 0 -> 2 + 2 -> 3 + 1 -> 3 + } + + $ hg debugindexdot -m + digraph G { + -1 -> 0 + 0 -> 1 + 0 -> 2 + 2 -> 3 + 1 -> 3 + } + $ hg debugindexdot a digraph G { -1 -> 0 diff -r 53e532007878 -r cb9cf42c902f tests/test-fastannotate-hg.t --- a/tests/test-fastannotate-hg.t Tue Aug 14 16:28:21 2018 +0000 +++ b/tests/test-fastannotate-hg.t Mon Aug 20 21:01:05 2018 +0000 @@ -491,7 +491,7 @@ > EOF $ hg debugsetparents 17 17 $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:2" - $ hg debugindexdot .hg/store/data/baz.i + $ hg debugindexdot baz digraph G { -1 -> 0 0 -> 1 @@ -523,7 +523,7 @@ > EOF $ hg debugsetparents 19 18 $ hg --config extensions.legacyrepo=../legacyrepo.py commit -m "baz:4" - $ hg debugindexdot .hg/store/data/baz.i + $ hg debugindexdot baz digraph G { -1 -> 0 0 -> 1