# HG changeset patch # User mpm@selenic.com # Date 2005-05-05 06:45:52 # Node ID 57a1eef7941545af94295c45439e5d14138c8784 # Parent 018fb8d9ea8de6de59f57354d43b7fb4cd26ed0a Add debughash and debugindex commands diff --git a/hg b/hg --- a/hg +++ b/hg @@ -211,6 +211,20 @@ elif cmd == "dumpmanifest": for f in files: print hg.hex(m[f]), f +elif cmd == "debughash": + f = repo.file(args[0]) + print f.encodepath(args[0]) + +elif cmd == "debugindex": + r = hg.revlog(open, args[0], "") + print " rev offset length base linkrev"+\ + " p1 p2 nodeid" + for i in range(r.count()): + e = r.index[i] + print "% 6d % 9d % 7d % 5d % 7d %s.. %s.. %s.." % ( + i, e[0], e[1], e[2], e[3], + hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5])) + elif cmd == "merge": if args: other = hg.repository(ui, args[0])