mercurial/debugcommands.py
changeset 52574 cac851655570
parent 52457 8dede0df9de9
child 52636 0e11e532c958
--- a/mercurial/debugcommands.py	Tue Dec 17 00:47:42 2024 -0500
+++ b/mercurial/debugcommands.py	Tue Dec 17 00:56:01 2024 -0500
@@ -4712,8 +4712,7 @@
                     continue
 
                 if line.startswith(b'BODYFILE '):
-                    with open(line.split(b' ', 1), 'rb') as fh:
-                        body = fh.read()
+                    body = util.readfile(line.split(b' ', 1))
                 elif line.startswith(b'frame '):
                     frame = wireprotoframing.makeframefromhumanstring(
                         line[len(b'frame ') :]