# HG changeset patch # User Yuya Nishihara # Date 2018-09-25 13:19:40 # Node ID 7a9e2d85f475b1675da537ece26419887f9d8b4e # Parent e5871e8fbb57e7ce3a4616f3b2910422275572c1 revlog: catch more specific exception in shortest() Since revlog._partialmatch() catches RevlogError coming from cext and re-raises AmbiguousPrefixLookupError, catching RevlogError here seems less correct. Differential Revision: https://phab.mercurial-scm.org/D4735 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1325,7 +1325,7 @@ class revlog(object): def isvalid(prefix): try: node = self._partialmatch(prefix) - except error.RevlogError: + except error.AmbiguousPrefixLookupError: return False except error.WdirUnsupported: # single 'ff...' match