error: add a new UnknownIdentifier error type
This will be used by the revset and fileset code to communicate more
specific errors to higher levels so that we might be able to offer
suggestions about what function might have been similar.
--- a/mercurial/error.py Mon Nov 24 16:42:49 2014 -0500
+++ b/mercurial/error.py Mon Jan 26 14:31:01 2015 -0500
@@ -67,6 +67,15 @@
class ParseError(Exception):
"""Raised when parsing config files and {rev,file}sets (msg[, pos])"""
+class UnknownIdentifier(ParseError):
+ """Exception raised when a {rev,file}set references an unknown identifier"""
+
+ def __init__(self, function, symbols):
+ from i18n import _
+ ParseError.__init__(self, _("unknown identifier: %s") % function)
+ self.function = function
+ self.symbols = symbols
+
class RepoError(Exception):
def __init__(self, *args, **kw):
Exception.__init__(self, *args)