Mercurial > hg-stable
comparison mercurial/wireproto.py @ 36461:ec43960b03e8
wireproto: use %d to encode an int, not a %s
Differential Revision: https://phab.mercurial-scm.org/D2449
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 26 Feb 2018 00:50:57 -0500 |
parents | be9c497e0bfd |
children | 33c6f8f0388d |
comparison
equal
deleted
inserted
replaced
36460:efebfa9b4cab | 36461:ec43960b03e8 |
---|---|
953 with proto.mayberedirectstdio() as output: | 953 with proto.mayberedirectstdio() as output: |
954 r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key), | 954 r = repo.pushkey(encoding.tolocal(namespace), encoding.tolocal(key), |
955 encoding.tolocal(old), new) or False | 955 encoding.tolocal(old), new) or False |
956 | 956 |
957 output = output.getvalue() if output else '' | 957 output = output.getvalue() if output else '' |
958 return bytesresponse('%s\n%s' % (int(r), output)) | 958 return bytesresponse('%d\n%s' % (int(r), output)) |
959 | 959 |
960 @wireprotocommand('stream_out') | 960 @wireprotocommand('stream_out') |
961 def stream(repo, proto): | 961 def stream(repo, proto): |
962 '''If the server supports streaming clone, it advertises the "stream" | 962 '''If the server supports streaming clone, it advertises the "stream" |
963 capability with a value representing the version and flags of the repo | 963 capability with a value representing the version and flags of the repo |