changeset 37353:ac666c5c2e0c

wireproto: use repo.lookup() for lookup command I'm trying to reduce use of repo[<string>] and this seems like an obvious place to use repo.lookup(). Differential Revision: https://phab.mercurial-scm.org/D3081
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 04 Apr 2018 15:11:43 -0700
parents 92171562c7f3
children a6014392837e
files mercurial/wireproto.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)