comparison mercurial/commands.py @ 989:1b6eb272b238

Reformat debugindex output
author mpm@selenic.com
date Sun, 21 Aug 2005 16:51:50 -0700
parents a66e249d77ae
children e37cd99fa909 25e7ea0f2cff
comparison
equal deleted inserted replaced
988:a66e249d77ae 989:1b6eb272b238
611 611
612 def debugindex(ui, file_): 612 def debugindex(ui, file_):
613 """dump the contents of an index file""" 613 """dump the contents of an index file"""
614 r = hg.revlog(hg.opener(""), file_, "") 614 r = hg.revlog(hg.opener(""), file_, "")
615 ui.write(" rev offset length base linkrev" + 615 ui.write(" rev offset length base linkrev" +
616 " p1 p2 nodeid\n") 616 " nodeid p1 p2\n")
617 for i in range(r.count()): 617 for i in range(r.count()):
618 e = r.index[i] 618 e = r.index[i]
619 ui.write("% 6d % 9d % 7d % 6d % 7d %s.. %s.. %s..\n" % ( 619 ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % (
620 i, e[0], e[1], e[2], e[3], 620 i, e[0], e[1], e[2], e[3],
621 hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5]))) 621 hg.short(e[6]), hg.short(e[4]), hg.short(e[5])))
622 622
623 def debugindexdot(ui, file_): 623 def debugindexdot(ui, file_):
624 """dump an index DAG as a .dot file""" 624 """dump an index DAG as a .dot file"""
625 r = hg.revlog(hg.opener(""), file_, "") 625 r = hg.revlog(hg.opener(""), file_, "")
626 ui.write("digraph G {\n") 626 ui.write("digraph G {\n")