Mercurial > public > mercurial-scm > hg
comparison mercurial/debugcommands.py @ 52574:cac851655570
debugwireproto: replace a trivial file read with the `util` function
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 17 Dec 2024 00:56:01 -0500 |
parents | 8dede0df9de9 |
children | 0e11e532c958 |
comparison
equal
deleted
inserted
replaced
52573:006feec78d52 | 52574:cac851655570 |
---|---|
4710 value = pycompat.strurl(m.group(2)) | 4710 value = pycompat.strurl(m.group(2)) |
4711 headers[key] = value | 4711 headers[key] = value |
4712 continue | 4712 continue |
4713 | 4713 |
4714 if line.startswith(b'BODYFILE '): | 4714 if line.startswith(b'BODYFILE '): |
4715 with open(line.split(b' ', 1), 'rb') as fh: | 4715 body = util.readfile(line.split(b' ', 1)) |
4716 body = fh.read() | |
4717 elif line.startswith(b'frame '): | 4716 elif line.startswith(b'frame '): |
4718 frame = wireprotoframing.makeframefromhumanstring( | 4717 frame = wireprotoframing.makeframefromhumanstring( |
4719 line[len(b'frame ') :] | 4718 line[len(b'frame ') :] |
4720 ) | 4719 ) |
4721 | 4720 |