mercurial/debugcommands.py
changeset 39279 cb9cf42c902f
parent 39244 73cf21b2e8a6
child 39281 dd6bc2509bdc
equal deleted inserted replaced
39278:53e532007878 39279:cb9cf42c902f
  1176 @command('debugindexdot', cmdutil.debugrevlogopts,
  1176 @command('debugindexdot', cmdutil.debugrevlogopts,
  1177     _('-c|-m|FILE'), optionalrepo=True)
  1177     _('-c|-m|FILE'), optionalrepo=True)
  1178 def debugindexdot(ui, repo, file_=None, **opts):
  1178 def debugindexdot(ui, repo, file_=None, **opts):
  1179     """dump an index DAG as a graphviz dot file"""
  1179     """dump an index DAG as a graphviz dot file"""
  1180     opts = pycompat.byteskwargs(opts)
  1180     opts = pycompat.byteskwargs(opts)
  1181     r = cmdutil.openrevlog(repo, 'debugindexdot', file_, opts)
  1181     r = cmdutil.openstorage(repo, 'debugindexdot', file_, opts)
  1182     ui.write(("digraph G {\n"))
  1182     ui.write(("digraph G {\n"))
  1183     for i in r:
  1183     for i in r:
  1184         node = r.node(i)
  1184         node = r.node(i)
  1185         pp = r.parents(node)
  1185         pp = r.parents(node)
  1186         ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))
  1186         ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))