comparison hgext/convert/convcmd.py @ 48941:fd5b8e696b75

py3: stop using util.iterfile() The Python 3 implementation is a no-op. So this is equivalent. We still keep util.iterfile() around for backwards API compatibility to help the Python 3 migration. It can be deleted in a future release. Differential Revision: https://phab.mercurial-scm.org/D12347
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 12:42:48 -0700
parents 06de08b36c82
children 642e31cb55f0
comparison
equal deleted inserted replaced
48940:2974cdda819b 48941:fd5b8e696b75
240 if not path: 240 if not path:
241 return {} 241 return {}
242 m = {} 242 m = {}
243 try: 243 try:
244 fp = open(path, b'rb') 244 fp = open(path, b'rb')
245 for i, line in enumerate(util.iterfile(fp)): 245 for i, line in enumerate(fp):
246 line = line.splitlines()[0].rstrip() 246 line = line.splitlines()[0].rstrip()
247 if not line: 247 if not line:
248 # Ignore blank lines 248 # Ignore blank lines
249 continue 249 continue
250 # split line 250 # split line