diff -r 006feec78d52 -r cac851655570 mercurial/debugcommands.py --- 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 ') :]