Show More
@@ -552,7 +552,7 b' class mapfile(dict):' | |||
|
552 | 552 | if err.errno != errno.ENOENT: |
|
553 | 553 | raise |
|
554 | 554 | return |
|
555 |
for i, line in enumerate( |
|
|
555 | for i, line in enumerate(fp): | |
|
556 | 556 | line = line.splitlines()[0].rstrip() |
|
557 | 557 | if not line: |
|
558 | 558 | # Ignore blank lines |
@@ -242,7 +242,7 b' class converter(object):' | |||
|
242 | 242 | m = {} |
|
243 | 243 | try: |
|
244 | 244 | fp = open(path, b'rb') |
|
245 |
for i, line in enumerate( |
|
|
245 | for i, line in enumerate(fp): | |
|
246 | 246 | line = line.splitlines()[0].rstrip() |
|
247 | 247 | if not line: |
|
248 | 248 | # Ignore blank lines |
@@ -1611,7 +1611,7 b' def readpatternfile(filepath, warn, sour' | |||
|
1611 | 1611 | patterns = [] |
|
1612 | 1612 | |
|
1613 | 1613 | fp = open(filepath, b'rb') |
|
1614 |
for lineno, line in enumerate( |
|
|
1614 | for lineno, line in enumerate(fp, start=1): | |
|
1615 | 1615 | if b"#" in line: |
|
1616 | 1616 | global _commentre |
|
1617 | 1617 | if not _commentre: |
@@ -1259,7 +1259,7 b' the hunk is left unchanged.' | |||
|
1259 | 1259 | # Remove comment lines |
|
1260 | 1260 | patchfp = open(patchfn, 'rb') |
|
1261 | 1261 | ncpatchfp = stringio() |
|
1262 |
for line in |
|
|
1262 | for line in patchfp: | |
|
1263 | 1263 | line = util.fromnativeeol(line) |
|
1264 | 1264 | if not line.startswith(b'#'): |
|
1265 | 1265 | ncpatchfp.write(line) |
@@ -2343,7 +2343,7 b' def _externalpatch(ui, repo, patcher, pa' | |||
|
2343 | 2343 | ui.debug(b'Using external patch tool: %s\n' % cmd) |
|
2344 | 2344 | fp = procutil.popen(cmd, b'rb') |
|
2345 | 2345 | try: |
|
2346 |
for line in |
|
|
2346 | for line in fp: | |
|
2347 | 2347 | line = line.rstrip() |
|
2348 | 2348 | ui.note(line + b'\n') |
|
2349 | 2349 | if line.startswith(b'patching file '): |
@@ -661,7 +661,7 b' class fncache(object):' | |||
|
661 | 661 | """make sure there is no empty string in entries""" |
|
662 | 662 | if b'' in self.entries: |
|
663 | 663 | fp.seek(0) |
|
664 |
for n, line in enumerate( |
|
|
664 | for n, line in enumerate(fp): | |
|
665 | 665 | if not line.rstrip(b'\n'): |
|
666 | 666 | t = _(b'invalid entry in fncache, line %d') % (n + 1) |
|
667 | 667 | if warn: |
General Comments 0
You need to be logged in to leave comments.
Login now