Mercurial > public > mercurial-scm > hg
diff mercurial/revlog.py @ 32659:7b17f9de6d3e
revlog: map rev(wdirid) to WdirUnsupported exception
This will allow us to map repo["ff..."] to workingctx. _partialmatch() will
be updated later. I tried "return wdirrev" in place of raising the exception,
but earlier exception seemed better.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 20 Aug 2016 22:37:58 +0900 |
parents | 34e9b8b94f66 |
children | af854b1b36f8 |
line wrap: on
line diff
--- a/mercurial/revlog.py Sat Jun 03 19:12:01 2017 +0900 +++ b/mercurial/revlog.py Sat Aug 20 22:37:58 2016 +0900 @@ -26,6 +26,7 @@ hex, nullid, nullrev, + wdirid, wdirrev, ) from .i18n import _ @@ -416,6 +417,8 @@ raise except RevlogError: # parsers.c radix tree lookup failed + if node == wdirid: + raise error.WdirUnsupported raise LookupError(node, self.indexfile, _('no node')) except KeyError: # pure python cache lookup failed @@ -430,6 +433,8 @@ if v == node: self._nodepos = r - 1 return r + if node == wdirid: + raise error.WdirUnsupported raise LookupError(node, self.indexfile, _('no node')) # Accessors for index entries.