Details
Details
- Reviewers
ryanmce - Group Reviewers
hg-reviewers - Commits
- rHG31fdd0509de9: wireproto: use %d to encode int, not %s
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| ryanmce |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| try: | try: | ||||
| k = encoding.tolocal(key) | k = encoding.tolocal(key) | ||||
| c = repo[k] | c = repo[k] | ||||
| r = c.hex() | r = c.hex() | ||||
| success = 1 | success = 1 | ||||
| except Exception as inst: | except Exception as inst: | ||||
| r = str(inst) | r = str(inst) | ||||
| success = 0 | success = 0 | ||||
| return "%s %s\n" % (success, r) | return "%d %s\n" % (success, r) | ||||
| @wireprotocommand('known', 'nodes *') | @wireprotocommand('known', 'nodes *') | ||||
| def known(repo, proto, nodes, others): | def known(repo, proto, nodes, others): | ||||
| return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes))) | return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes))) | ||||
| @wireprotocommand('pushkey', 'namespace key old new') | @wireprotocommand('pushkey', 'namespace key old new') | ||||
| def pushkey(repo, proto, namespace, key, old, new): | def pushkey(repo, proto, namespace, key, old, new): | ||||
| # compatibility with pre-1.8 clients which were accidentally | # compatibility with pre-1.8 clients which were accidentally | ||||