# HG changeset patch # User Martin von Zweigbergk # Date 1522879903 25200 # Node ID ac666c5c2e0ceb2c1262540ed85cd2822a632459 # Parent 92171562c7f39bcfbdeab4c3aca49de04830be0a wireproto: use repo.lookup() for lookup command I'm trying to reduce use of repo[] and this seems like an obvious place to use repo.lookup(). Differential Revision: https://phab.mercurial-scm.org/D3081 diff -r 92171562c7f3 -r ac666c5c2e0c mercurial/wireproto.py --- a/mercurial/wireproto.py Wed Apr 04 14:57:58 2018 -0700 +++ b/mercurial/wireproto.py Wed Apr 04 15:11:43 2018 -0700 @@ -1014,8 +1014,8 @@ def lookup(repo, proto, key): try: k = encoding.tolocal(key) - c = repo[k] - r = c.hex() + n = repo.lookup(k) + r = hex(n) success = 1 except Exception as inst: r = stringutil.forcebytestr(inst)