Patchwork D6661: lookup: don't use "00changelog.i@None" when lookup of prefix fails

login
register
mail settings
Submitter phabricator
Date July 22, 2019, 10:54 a.m.
Message ID <60f15a9717b7254a12f5f8984b991e77@localhost.localdomain>
Download mbox | patch
Permalink /patch/41000/
State Not Applicable
Headers show

Comments

phabricator - July 22, 2019, 10:54 a.m.
Closed by commit rHGa979939da14e: lookup: don&#039;t use &quot;00changelog.i@None&quot; when lookup of prefix fails (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6661?vs=15977&id=15992

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6661/new/

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1355,13 +1355,13 @@ 
         """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