mercurial/patch.py
changeset 48941 fd5b8e696b75
parent 48935 2cce2fa5bcf7
child 48946 642e31cb55f0
--- a/mercurial/patch.py	Thu Mar 03 07:56:47 2022 -0800
+++ b/mercurial/patch.py	Mon Feb 21 12:42:48 2022 -0700
@@ -1259,7 +1259,7 @@
                     # Remove comment lines
                     patchfp = open(patchfn, 'rb')
                     ncpatchfp = stringio()
-                    for line in util.iterfile(patchfp):
+                    for line in patchfp:
                         line = util.fromnativeeol(line)
                         if not line.startswith(b'#'):
                             ncpatchfp.write(line)
@@ -2343,7 +2343,7 @@
     ui.debug(b'Using external patch tool: %s\n' % cmd)
     fp = procutil.popen(cmd, b'rb')
     try:
-        for line in util.iterfile(fp):
+        for line in fp:
             line = line.rstrip()
             ui.note(line + b'\n')
             if line.startswith(b'patching file '):