changeset 47318 | 13dd5bb5492a |
parent 47297 | 18415fc918a1 |
child 47424 | 22e21deed474 |
--- a/mercurial/transaction.py Tue May 18 23:36:21 2021 -0400 +++ b/mercurial/transaction.py Sun May 16 10:57:14 2021 -0400 @@ -720,9 +720,8 @@ entries = [] backupentries = [] - fp = opener.open(file) - lines = fp.readlines() - fp.close() + with opener.open(file) as fp: + lines = fp.readlines() for l in lines: try: f, o = l.split(b'\0')