changeset 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 e5871e8fbb57
children 85a474adaf26
files mercurial/revlog.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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