diff contrib/undumprevlog @ 43659:99e231afc29c

black: blacken scripts test-check-format.t doesn't appear to detect Python scripts with shebangs. But my editor which is configured to auto run black on Python files does and it appears some files are not blackened. This commit blackens scripts that need it. # skip-blame reformatting Differential Revision: https://phab.mercurial-scm.org/D7420
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 14 Nov 2019 20:35:11 -0800
parents a063b84ce064
children 4c1b4805db57
line wrap: on
line diff
--- 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()