localrepo: use revsymbol() in lookup()
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 15:08:09 -0700
changeset 37315 0a1fb171dc1d
parent 37314 8474005fcfe2
child 37316 836867586b83
localrepo: use revsymbol() in lookup() lookup() seems to be about looking up a revision based on a symbol that may come from the user (via the wire protocol), so revsymbol() is appropriate here. Differential Revision: https://phab.mercurial-scm.org/D3055
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sun Apr 01 23:29:51 2018 -0700
+++ b/mercurial/localrepo.py	Tue Apr 03 15:08:09 2018 -0700
@@ -1021,7 +1021,7 @@
                 pass
 
     def lookup(self, key):
-        return self[key].node()
+        return scmutil.revsymbol(self, key).node()
 
     def lookupbranch(self, key, remote=None):
         repo = remote or self