# HG changeset patch # User Martin von Zweigbergk # Date 2019-07-19 16:43:50 # Node ID 24111fb9a725dea2bb52d7c2bae8b4900d168a92 # Parent eb27d9eee2cc80a92db6396915dfa612c5c928fb lookup: don't use "00changelog.i@None" when lookup of prefix fails We were shadowing the "node" variable, so we always passed None to the LookupError instead of the node we meant to pass. (This showed up in py3 tests since py3 doesn't like to format None using "%s".) Differential Revision: https://phab.mercurial-scm.org/D6661 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1355,13 +1355,13 @@ class revlog(object): """Find the shortest unambiguous prefix that matches node.""" def isvalid(prefix): try: - node = self._partialmatch(prefix) + matchednode = self._partialmatch(prefix) except error.AmbiguousPrefixLookupError: return False except error.WdirUnsupported: # single 'ff...' match return True - if node is None: + if matchednode is None: raise error.LookupError(node, self.indexfile, _('no node')) return True