hgweb: unify import style of error classes
authorYuya Nishihara <yuya@tcha.org>
Sun, 01 Nov 2015 14:43:25 +0900
changeset 27009 f5faef7e9119
parent 27008 7f19f331ef59
child 27010 f4fec0940278
hgweb: unify import style of error classes It will be enforced by the import checker.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Sun Nov 01 14:00:14 2015 +0900
+++ b/mercurial/hgweb/webcommands.py	Sun Nov 01 14:43:25 2015 +0900
@@ -15,7 +15,6 @@
 from mercurial import graphmod, patch
 from mercurial import scmutil
 from mercurial.i18n import _
-from mercurial.error import ParseError, RepoLookupError, Abort
 from mercurial import revset
 
 __all__ = []
@@ -225,7 +224,7 @@
         revdef = 'reverse(%s)' % query
         try:
             tree = revset.parse(revdef)
-        except ParseError:
+        except error.ParseError:
             # can't parse to a revset tree
             return MODE_KEYWORD, query
 
@@ -249,7 +248,8 @@
             # RepoLookupError: no such revision, e.g. in 'revision:'
             # Abort: bookmark/tag not exists
             # LookupError: ambiguous identifier, e.g. in '(bc)' on a large repo
-        except (ParseError, RepoLookupError, Abort, LookupError):
+        except (error.ParseError, error.RepoLookupError, error.Abort,
+                LookupError):
             return MODE_KEYWORD, query
 
     def changelist(**map):