Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 37970:76e933e0ccc9
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 03 May 2018 15:25:16 -0700 |
parents | 0db7fe7c34d3 |
children | 3ac950cd5978 |
comparison
equal
deleted
inserted
replaced
37969:0db7fe7c34d3 | 37970:76e933e0ccc9 |
---|---|
1522 except error.WdirUnsupported: | 1522 except error.WdirUnsupported: |
1523 # single 'ff...' match | 1523 # single 'ff...' match |
1524 return True | 1524 return True |
1525 if node is None: | 1525 if node is None: |
1526 raise LookupError(node, self.indexfile, _('no node')) | 1526 raise LookupError(node, self.indexfile, _('no node')) |
1527 return not isrev(prefix) | 1527 return True |
1528 | 1528 |
1529 def maybewdir(prefix): | 1529 def maybewdir(prefix): |
1530 return all(c == 'f' for c in prefix) | 1530 return all(c == 'f' for c in prefix) |
1531 | 1531 |
1532 hexnode = hex(node) | 1532 hexnode = hex(node) |