# HG changeset patch # User mpm@selenic.com # Date 1124934017 25200 # Node ID 4296754ba7b4434cda00b7cd13aa439015c9d778 # Parent 5f191561a061ff95359e8cca7d1e9d2ee6b3952a Add debugdata for dumping revlog revision data diff -r 5f191561a061 -r 4296754ba7b4 mercurial/commands.py --- a/mercurial/commands.py Wed Aug 24 14:46:02 2005 -0700 +++ b/mercurial/commands.py Wed Aug 24 18:40:17 2005 -0700 @@ -612,6 +612,11 @@ time.strftime("%x %X", time.localtime(dc[file_][3])), file_)) +def debugdata(ui, file_, rev): + """dump the contents of an data file revision""" + r = hg.revlog(hg.opener(""), file_[:-2] + ".i", file_) + ui.write(r.revision(r.lookup(rev))) + def debugindex(ui, file_): """dump the contents of an index file""" r = hg.revlog(hg.opener(""), file_, "") @@ -1377,6 +1382,7 @@ "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), "debugconfig": (debugconfig, [], 'debugconfig'), "debugstate": (debugstate, [], 'debugstate'), + "debugdata": (debugdata, [], 'debugdata FILE REV'), "debugindex": (debugindex, [], 'debugindex FILE'), "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), "debugwalk": @@ -1518,7 +1524,8 @@ ('', 'time', None, 'time how long the command takes'), ] -norepo = "clone init version help debugconfig debugindex debugindexdot paths" +norepo = "clone init version help debugconfig debugdata" + \ + " debugindex debugindexdot paths" def find(cmd): for e in table.keys():