# HG changeset patch # User Jun Wu # Date 1479165365 0 # Node ID 7f3593c2947328cfeef32afa36be5fecccdb0f30 # Parent b63bef41a7b6df6249471f0a487ea552ca9f9ffb match: migrate to util.iterfile diff -r b63bef41a7b6 -r 7f3593c29473 mercurial/match.py --- 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: