changeset 27009:f5faef7e9119

hgweb: unify import style of error classes It will be enforced by the import checker.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 01 Nov 2015 14:43:25 +0900
parents 7f19f331ef59
children f4fec0940278
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):