Mercurial > public > mercurial-scm > hg-stable
diff mercurial/error.py @ 18855:50c922c1b514 stable 2.5.3
hgweb: show correct error message for i18n environment
If exception is error.LookupError and running in i18n environment,
below condition is always true.
Because msg is translated and dosen't contain 'manifest'.
if util.safehasattr(err, 'name') and 'manifest' not in msg:
This patch creates a new exception class and uses it instead of
string match.
author | Takumi IINO <trot.thunder@gmail.com> |
---|---|
date | Fri, 15 Feb 2013 18:07:14 +0900 |
parents | f4522df38c65 |
children | 3c224e0949de |
line wrap: on
line diff
--- a/mercurial/error.py Mon Apr 01 18:48:12 2013 -0300 +++ b/mercurial/error.py Fri Feb 15 18:07:14 2013 +0900 @@ -27,6 +27,9 @@ def __str__(self): return RevlogError.__str__(self) +class ManifestLookupError(LookupError): + pass + class CommandError(Exception): """Exception raised on errors in parsing the command line."""