--- a/mercurial/debugcommands.py Wed Dec 04 20:57:35 2024 -0500
+++ b/mercurial/debugcommands.py Wed Dec 04 21:03:05 2024 -0500
@@ -33,9 +33,6 @@
nullrev,
short,
)
-from .pycompat import (
- open,
-)
from . import (
bundle2,
bundlerepo,
@@ -1384,7 +1381,7 @@
dest = ui
if output:
- dest = open(output, b"wb", _chunksize)
+ dest = open(output, "wb", _chunksize)
try:
data = fh.read(_chunksize)
while data:
@@ -3443,7 +3440,7 @@
# can't seek a pipe, so `ab` mode fails on py3
logfh = os.fdopen(int(opts['logiofd']), 'wb', 0)
elif opts['logiofile']:
- logfh = open(opts['logiofile'], b'ab', 0)
+ logfh = open(opts['logiofile'], 'ab', 0)
s = wireprotoserver.sshserver(ui, repo, logfh=logfh)
s.serve_forever()
@@ -4699,7 +4696,7 @@
continue
if line.startswith(b'BODYFILE '):
- with open(line.split(b' ', 1), b'rb') as fh:
+ with open(line.split(b' ', 1), 'rb') as fh:
body = fh.read()
elif line.startswith(b'frame '):
frame = wireprotoframing.makeframefromhumanstring(