equal
deleted
inserted
replaced
1012 |
1012 |
1013 @wireprotocommand('lookup', 'key', permission='pull') |
1013 @wireprotocommand('lookup', 'key', permission='pull') |
1014 def lookup(repo, proto, key): |
1014 def lookup(repo, proto, key): |
1015 try: |
1015 try: |
1016 k = encoding.tolocal(key) |
1016 k = encoding.tolocal(key) |
1017 c = repo[k] |
1017 n = repo.lookup(k) |
1018 r = c.hex() |
1018 r = hex(n) |
1019 success = 1 |
1019 success = 1 |
1020 except Exception as inst: |
1020 except Exception as inst: |
1021 r = stringutil.forcebytestr(inst) |
1021 r = stringutil.forcebytestr(inst) |
1022 success = 0 |
1022 success = 0 |
1023 return wireprototypes.bytesresponse('%d %s\n' % (success, r)) |
1023 return wireprototypes.bytesresponse('%d %s\n' % (success, r)) |