##// END OF EJS Templates
run-tests: backout d7c23f4a14c7...
run-tests: backout d7c23f4a14c7 We no longer have any data files, so this is no longer needed. Augie Fackler reported on IRC that this "hack" had never worked for him in the first place.

File last commit:

r7361:9fe97eea default
r10030:cbc93d8e default
Show More
dumprevlog
25 lines | 677 B | text/plain | TextLexer
Matt Mackall
add simple dump and undump scripts to contrib/
r6433 #!/usr/bin/env python
# Dump revlogs as raw data stream
# $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
import sys
Adrian Buehlmann
contrib: fix binary file issues with dumprevlog on Windows...
r6466 from mercurial import revlog, node, util
for fp in (sys.stdin, sys.stdout, sys.stderr):
util.set_binary(fp)
Matt Mackall
add simple dump and undump scripts to contrib/
r6433
for f in sys.argv[1:]:
Adrian Buehlmann
contrib: fix binary file issues with dumprevlog on Windows...
r6466 binopen = lambda fn: open(fn, 'rb')
r = revlog.revlog(binopen, f)
Matt Mackall
add simple dump and undump scripts to contrib/
r6433 print "file:", f
Matt Mackall
add __len__ and __iter__ methods to repo and revlog
r6750 for i in r:
Matt Mackall
add simple dump and undump scripts to contrib/
r6433 n = r.node(i)
p = r.parents(n)
d = r.revision(n)
print "node:", node.hex(n)
Matt Mackall
linkrev: take a revision number rather than a hash
r7361 print "linkrev:", r.linkrev(i)
Matt Mackall
add simple dump and undump scripts to contrib/
r6433 print "parents:", node.hex(p[0]), node.hex(p[1])
print "length:", len(d)
print "-start-"
print d
print "-end-"