Mercurial > hg-stable
comparison contrib/dumprevlog @ 6750:fb42030d79d6
add __len__ and __iter__ methods to repo and revlog
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:50 -0500 |
parents | 9c426da6b03b |
children | 9fe97eea5510 |
comparison
equal
deleted
inserted
replaced
6749:51b0e799352f | 6750:fb42030d79d6 |
---|---|
10 | 10 |
11 for f in sys.argv[1:]: | 11 for f in sys.argv[1:]: |
12 binopen = lambda fn: open(fn, 'rb') | 12 binopen = lambda fn: open(fn, 'rb') |
13 r = revlog.revlog(binopen, f) | 13 r = revlog.revlog(binopen, f) |
14 print "file:", f | 14 print "file:", f |
15 for i in xrange(r.count()): | 15 for i in r: |
16 n = r.node(i) | 16 n = r.node(i) |
17 p = r.parents(n) | 17 p = r.parents(n) |
18 d = r.revision(n) | 18 d = r.revision(n) |
19 print "node:", node.hex(n) | 19 print "node:", node.hex(n) |
20 print "linkrev:", r.linkrev(n) | 20 print "linkrev:", r.linkrev(n) |