# HG changeset patch # User Augie Fackler # Date 2015-01-26 19:31:01 # Node ID d2b81256db1eb20b4039df6c75e5f1245804f41d # Parent 4bb348ae43cbe1df9ea3928abc0b18dc6c7e3c6a 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. diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -67,6 +67,15 @@ class OutOfBandError(Exception): 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)