609 for file_ in keys: |
609 for file_ in keys: |
610 ui.write("%c %3o %10d %s %s\n" |
610 ui.write("%c %3o %10d %s %s\n" |
611 % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], |
611 % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], |
612 time.strftime("%x %X", |
612 time.strftime("%x %X", |
613 time.localtime(dc[file_][3])), file_)) |
613 time.localtime(dc[file_][3])), file_)) |
|
614 |
|
615 def debugdata(ui, file_, rev): |
|
616 """dump the contents of an data file revision""" |
|
617 r = hg.revlog(hg.opener(""), file_[:-2] + ".i", file_) |
|
618 ui.write(r.revision(r.lookup(rev))) |
614 |
619 |
615 def debugindex(ui, file_): |
620 def debugindex(ui, file_): |
616 """dump the contents of an index file""" |
621 """dump the contents of an index file""" |
617 r = hg.revlog(hg.opener(""), file_, "") |
622 r = hg.revlog(hg.opener(""), file_, "") |
618 ui.write(" rev offset length base linkrev" + |
623 ui.write(" rev offset length base linkrev" + |
1375 'hg commit [OPTION]... [FILE]...'), |
1380 'hg commit [OPTION]... [FILE]...'), |
1376 "copy": (copy, [], 'hg copy SOURCE DEST'), |
1381 "copy": (copy, [], 'hg copy SOURCE DEST'), |
1377 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), |
1382 "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), |
1378 "debugconfig": (debugconfig, [], 'debugconfig'), |
1383 "debugconfig": (debugconfig, [], 'debugconfig'), |
1379 "debugstate": (debugstate, [], 'debugstate'), |
1384 "debugstate": (debugstate, [], 'debugstate'), |
|
1385 "debugdata": (debugdata, [], 'debugdata FILE REV'), |
1380 "debugindex": (debugindex, [], 'debugindex FILE'), |
1386 "debugindex": (debugindex, [], 'debugindex FILE'), |
1381 "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), |
1387 "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), |
1382 "debugwalk": |
1388 "debugwalk": |
1383 (debugwalk, |
1389 (debugwalk, |
1384 [('I', 'include', [], 'include path in search'), |
1390 [('I', 'include', [], 'include path in search'), |
1516 ('y', 'noninteractive', None, 'run non-interactively'), |
1522 ('y', 'noninteractive', None, 'run non-interactively'), |
1517 ('', 'version', None, 'output version information and exit'), |
1523 ('', 'version', None, 'output version information and exit'), |
1518 ('', 'time', None, 'time how long the command takes'), |
1524 ('', 'time', None, 'time how long the command takes'), |
1519 ] |
1525 ] |
1520 |
1526 |
1521 norepo = "clone init version help debugconfig debugindex debugindexdot paths" |
1527 norepo = "clone init version help debugconfig debugdata" + \ |
|
1528 " debugindex debugindexdot paths" |
1522 |
1529 |
1523 def find(cmd): |
1530 def find(cmd): |
1524 for e in table.keys(): |
1531 for e in table.keys(): |
1525 if re.match("(%s)$" % e, cmd): |
1532 if re.match("(%s)$" % e, cmd): |
1526 return e, table[e] |
1533 return e, table[e] |