diff mercurial/ui.py @ 52607:cc918741a22a

ui: replace a trivial file read with the `util` function
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 17 Dec 2024 01:39:33 -0500
parents 8986a3a8147a
children 24ee91ba9aa8
line wrap: on
line diff
--- a/mercurial/ui.py	Tue Dec 17 01:35:52 2024 -0500
+++ b/mercurial/ui.py	Tue Dec 17 01:39:33 2024 -0500
@@ -2007,8 +2007,7 @@
                 blockedtag=b'editor',
             )
 
-            with open(name, 'rb') as f:
-                t = util.fromnativeeol(f.read())
+            t = util.fromnativeeol(util.readfile(name))
         finally:
             os.unlink(name)