Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/error.py @ 13447:931a72e00efa stable
introduce new RequirementError (issue2649)
This improves the misleading error message
$ hg identify
abort: there is no Mercurial repository here (.hg not found)!
to the more explicit
$ hg identify
abort: requirement 'fake' not supported!
for all commands in commands.optionalrepo, which includes the identify
and serve commands in particular.
This is for the case when a new entry in .hg/requires will be defined
in a future Mercurial release.
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 18 Feb 2011 20:25:25 +0100 |
parents | 6381fa7bfa53 |
children | 1a9256cdf10f |
comparison
equal
deleted
inserted
replaced
13446:1e497df514e2 | 13447:931a72e00efa |
---|---|
49 pass | 49 pass |
50 | 50 |
51 class CapabilityError(RepoError): | 51 class CapabilityError(RepoError): |
52 pass | 52 pass |
53 | 53 |
54 class RequirementError(RepoError): | |
55 """Exception raised if .hg/requires has an unknown entry.""" | |
56 pass | |
57 | |
54 class LockError(IOError): | 58 class LockError(IOError): |
55 def __init__(self, errno, strerror, filename, desc): | 59 def __init__(self, errno, strerror, filename, desc): |
56 IOError.__init__(self, errno, strerror, filename) | 60 IOError.__init__(self, errno, strerror, filename) |
57 self.desc = desc | 61 self.desc = desc |
58 | 62 |