D3501: shortest: remove unnecessary check for revnum in isvalid()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue May 8 18:07:29 UTC 2018


martinvonz created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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().

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

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



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


More information about the Mercurial-devel mailing list