##// END OF EJS Templates
py3: make contrib/dumprevlog use print_function
Pulkit Goyal -
r29166:6359b80f default
parent child Browse files
Show More
@@ -2,7 +2,7 b''
2 # Dump revlogs as raw data stream
2 # Dump revlogs as raw data stream
3 # $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
3 # $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
4
4
5 from __future__ import absolute_import
5 from __future__ import absolute_import, print_function
6
6
7 import sys
7 import sys
8 from mercurial import (
8 from mercurial import (
@@ -17,15 +17,15 b' for fp in (sys.stdin, sys.stdout, sys.st'
17 for f in sys.argv[1:]:
17 for f in sys.argv[1:]:
18 binopen = lambda fn: open(fn, 'rb')
18 binopen = lambda fn: open(fn, 'rb')
19 r = revlog.revlog(binopen, f)
19 r = revlog.revlog(binopen, f)
20 print "file:", f
20 print("file:", f)
21 for i in r:
21 for i in r:
22 n = r.node(i)
22 n = r.node(i)
23 p = r.parents(n)
23 p = r.parents(n)
24 d = r.revision(n)
24 d = r.revision(n)
25 print "node:", node.hex(n)
25 print("node:", node.hex(n))
26 print "linkrev:", r.linkrev(i)
26 print("linkrev:", r.linkrev(i))
27 print "parents:", node.hex(p[0]), node.hex(p[1])
27 print("parents:", node.hex(p[0]), node.hex(p[1]))
28 print "length:", len(d)
28 print("length:", len(d))
29 print "-start-"
29 print("-start-")
30 print d
30 print(d)
31 print "-end-"
31 print("-end-")
General Comments 0
You need to be logged in to leave comments. Login now