##// END OF EJS Templates
bookmarks: resolve divergent bookmark when moving across a branch...
bookmarks: resolve divergent bookmark when moving across a branch This patch resolves a single divergent bookmark if a divergent bookmark exists in the target revision and it current bookmark is not an ancestor of the target revision, else it would already be handled by the previous patch in this series. Test coverage is added.

File last commit:

r14233:659f34b8 default
r19111:6439d78e stable
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-"