[PATCH 4 of 4] hgweb: unify import style of error classes
Yuya Nishihara
yuya at tcha.org
Wed Nov 18 09:44:26 CST 2015
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1446356605 -32400
# Sun Nov 01 14:43:25 2015 +0900
# Node ID 25fe33dc765795ada295a3f0374c67f157357c13
# Parent 638b99be51a0a36152745893eddfb9e93e70980c
hgweb: unify import style of error classes
It will be enforced by the import checker.
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -15,7 +15,6 @@ from common import HTTP_OK, HTTP_FORBIDD
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 @@ def _search(web, req, tmpl):
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 @@ def _search(web, req, tmpl):
# 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):
More information about the Mercurial-devel
mailing list