Patchwork D3081: wireproto: use repo.lookup() for lookup command

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:50 a.m.
Message ID <b61e8e590bec180eba1d09c2a6af67e3@localhost.localdomain>
Download mbox | patch
Permalink /patch/30309/
State Not Applicable
Headers show

Comments

phabricator - April 5, 2018, 12:50 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGac666c5c2e0c: wireproto: use repo.lookup() for lookup command (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3081?vs=7655&id=7667

REVISION DETAIL
  https://phab.mercurial-scm.org/D3081

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -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)