changeset 30409:7f3593c29473

match: migrate to util.iterfile
author Jun Wu <quark@fb.com>
date Mon, 14 Nov 2016 23:16:05 +0000
parents b63bef41a7b6
children d1a0a64f6e16
files mercurial/match.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Mon Nov 14 23:15:01 2016 +0000
+++ b/mercurial/match.py	Mon Nov 14 23:16:05 2016 +0000
@@ -669,7 +669,7 @@
     patterns = []
 
     fp = open(filepath)
-    for lineno, line in enumerate(fp, start=1):
+    for lineno, line in enumerate(util.iterfile(fp), start=1):
         if "#" in line:
             global _commentre
             if not _commentre: