##// END OF EJS Templates
blackbox: add backup bundle paths to blackbox logs...
blackbox: add backup bundle paths to blackbox logs Writes the backup bundle paths to the blackbox so it's easy to see which backup bundle is associated with which command when you are debugging an issue. Example output: 2013/03/13 10:39:56 durham> strip tip 2013/03/13 10:39:59 durham> saved backup bundle to /data/users/durham/www-hg/.hg/strip-backup/e5fac262363a-backup.hg 2013/03/13 10:40:03 durham> strip tip exited 0 after 7.97 seconds

File last commit:

r14233:659f34b8 default
r18766:64b55625 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-"