transaction: windows workaround for missing line iteration support
authorJoerg Sonnenberger <joerg@bec.de>
Mon, 07 Dec 2020 11:23:34 +0100
changeset 46063 88de2639901b
parent 46062 14ff4929ca8c
child 46064 1f0ed7e63c2a
transaction: windows workaround for missing line iteration support The mixedfilemodewrapper doesn't support line iteration, so just read the whole file in one go. Differential Revision: https://phab.mercurial-scm.org/D9532
mercurial/transaction.py
--- a/mercurial/transaction.py	Sat Nov 28 15:04:44 2020 +0100
+++ b/mercurial/transaction.py	Mon Dec 07 11:23:34 2020 +0100
@@ -418,7 +418,7 @@
     def readjournal(self):
         self._file.seek(0)
         entries = []
-        for l in self._file:
+        for l in self._file.readlines():
             file, troffset = l.split(b'\0')
             entries.append((file, int(troffset)))
         return entries