Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGec43960b03e8: wireproto: use %d to encode an int, not a %s
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/wireproto.py (2 lines) |
else: | else: | ||||
new = encoding.tolocal(new) # normal path | new = encoding.tolocal(new) # normal path | ||||
with proto.mayberedirectstdio() as output: | with proto.mayberedirectstdio() as output: | ||||
r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key), | r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key), | ||||
encoding.tolocal(old), new) or False | encoding.tolocal(old), new) or False | ||||
output = output.getvalue() if output else '' | output = output.getvalue() if output else '' | ||||
return bytesresponse('%s\n%s' % (int(r), output)) | return bytesresponse('%d\n%s' % (int(r), output)) | ||||
@wireprotocommand('stream_out') | @wireprotocommand('stream_out') | ||||
def stream(repo, proto): | def stream(repo, proto): | ||||
'''If the server supports streaming clone, it advertises the "stream" | '''If the server supports streaming clone, it advertises the "stream" | ||||
capability with a value representing the version and flags of the repo | capability with a value representing the version and flags of the repo | ||||
it is serving. Client checks to see if it understands the format. | it is serving. Client checks to see if it understands the format. | ||||
''' | ''' | ||||
return streamres_legacy(streamclone.generatev1wireproto(repo)) | return streamres_legacy(streamclone.generatev1wireproto(repo)) |