D9532: transaction: windows workaround for missing line iteration support
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Mon Dec 7 10:24:54 UTC 2020
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
The mixedfilemodewrapper doesn't support line iteration, so just read
the whole file in one go.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9532
AFFECTED FILES
mercurial/transaction.py
CHANGE DETAILS
diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -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
To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list