##// END OF EJS Templates
tests: fix test-profile to not depend on HGPROF environment variable...
tests: fix test-profile to not depend on HGPROF environment variable The test-profile test would fail if the user had HGPROF set to another profiler in their environment. This fix makes the test independent of that environment variable. Reverts the previous attempt to fix this, which was not cross platoform.

File last commit:

r14233:659f34b8 default
r18765:cd2c8251 default
Show More
dumprevlog
25 lines | 676 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):
Adrian Buehlmann
rename util.set_binary to setbinary
r14233 util.setbinary(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-"