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

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 6:07 p.m.
Message ID <differential-rev-PHID-DREV-lgrvyws5tmosinghimrc-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31384/
State Superseded
Headers show

Comments

phabricator - May 8, 2018, 6:07 p.m.
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




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

Patch

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)