diff mercurial/revlog.py @ 39831:7a9e2d85f475

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
author Yuya Nishihara <yuya@tcha.org>
date Tue, 25 Sep 2018 22:19:40 +0900
parents a6b3c4c1019f
children 97986c9c69d3
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon Sep 24 22:32:30 2018 -0400
+++ b/mercurial/revlog.py	Tue Sep 25 22:19:40 2018 +0900
@@ -1325,7 +1325,7 @@
         def isvalid(prefix):
             try:
                 node = self._partialmatch(prefix)
-            except error.RevlogError:
+            except error.AmbiguousPrefixLookupError:
                 return False
             except error.WdirUnsupported:
                 # single 'ff...' match