diff -r 0796e266d26b -r 99e231afc29c contrib/undumprevlog --- a/contrib/undumprevlog Tue Nov 12 10:17:59 2019 -0500 +++ b/contrib/undumprevlog Thu Nov 14 20:35:11 2019 -0800 @@ -14,16 +14,15 @@ transaction, vfs as vfsmod, ) -from mercurial.utils import ( - procutil, -) +from mercurial.utils import procutil for fp in (sys.stdin, sys.stdout, sys.stderr): procutil.setbinary(fp) opener = vfsmod.vfs(b'.', False) -tr = transaction.transaction(sys.stderr.write, opener, {b'store': opener}, - b"undump.journal") +tr = transaction.transaction( + sys.stderr.write, opener, {b'store': opener}, b"undump.journal" +) while True: l = sys.stdin.readline() if not l: @@ -42,9 +41,9 @@ p2 = node.bin(p[1]) elif l.startswith("length:"): length = int(l[8:-1]) - sys.stdin.readline() # start marker + sys.stdin.readline() # start marker d = encoding.strtolocal(sys.stdin.read(length)) - sys.stdin.readline() # end marker + sys.stdin.readline() # end marker r.addrevision(d, tr, lr, p1, p2) tr.close()