shortest: remove unnecessary check for revnum in isvalid()
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 03 May 2018 15:25:16 -0700
changeset 37970 76e933e0ccc9
parent 37969 0db7fe7c34d3
child 37971 3ac950cd5978
shortest: remove unnecessary check for revnum in isvalid() We now always disambiguating against revnums after we've found an otherwise valid prefix, so we can safely remove the early isrev() check in isvalid(). Differential Revision: https://phab.mercurial-scm.org/D3501
mercurial/revlog.py
--- a/mercurial/revlog.py	Thu May 03 15:01:33 2018 -0700
+++ b/mercurial/revlog.py	Thu May 03 15:25:16 2018 -0700
@@ -1524,7 +1524,7 @@
                 return True
             if node is None:
                 raise LookupError(node, self.indexfile, _('no node'))
-            return not isrev(prefix)
+            return True
 
         def maybewdir(prefix):
             return all(c == 'f' for c in prefix)