revlog: catch more specific exception in shortest()
authorYuya Nishihara <yuya@tcha.org>
Tue, 25 Sep 2018 22:19:40 +0900
changeset 39836 7a9e2d85f475
parent 39835 e5871e8fbb57
child 39837 85a474adaf26
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
mercurial/revlog.py
--- 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