changeset 30398:b63bef41a7b6

store: migrate to util.iterfile
author Jun Wu <quark@fb.com>
date Mon, 14 Nov 2016 23:15:01 +0000
parents 564b33acc21f
children 7f3593c29473
files mercurial/store.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Mon Nov 14 23:14:06 2016 +0000
+++ b/mercurial/store.py	Mon Nov 14 23:15:01 2016 +0000
@@ -436,7 +436,7 @@
         self.entries = set(decodedir(fp.read()).splitlines())
         if '' in self.entries:
             fp.seek(0)
-            for n, line in enumerate(fp):
+            for n, line in enumerate(util.iterfile(fp)):
                 if not line.rstrip('\n'):
                     t = _('invalid entry in fncache, line %d') % (n + 1)
                     raise error.Abort(t)