Mercurial > hg-stable
changeset 14483:973959fbe8ec
readrequires: provide easier to understand error message
NEW:
$ hg id
abort: unknown repository format: requires feature 'foo' (upgrade Mercurial)!
OLD:
$ hg id
abort: requirement 'foo' not supported!
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 31 May 2011 19:16:25 +0200 |
parents | 58b36e9ea783 |
children | 4582a4dd1817 |
files | mercurial/scmutil.py tests/test-commit.t tests/test-identify.t tests/test-requires.t |
diffstat | 4 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue May 31 19:16:18 2011 +0200 +++ b/mercurial/scmutil.py Tue May 31 19:16:25 2011 +0200 @@ -698,6 +698,6 @@ requirements = set(opener.read("requires").splitlines()) for r in requirements: if r not in supported: - raise error.RequirementError( - _("requirement '%s' not supported") % r) + raise error.RequirementError(_("unknown repository format: " + "requires feature '%s' (upgrade Mercurial)") % r) return requirements
--- a/tests/test-commit.t Tue May 31 19:16:18 2011 +0200 +++ b/tests/test-commit.t Tue May 31 19:16:25 2011 +0200 @@ -98,7 +98,7 @@ $ echo foo >> foo $ echo fake >> .hg/requires $ hg commit -m bla - abort: requirement 'fake' not supported! + abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)! [255] $ cd ..
--- a/tests/test-identify.t Tue May 31 19:16:18 2011 +0200 +++ b/tests/test-identify.t Tue May 31 19:16:25 2011 +0200 @@ -107,11 +107,11 @@ $ echo fake >> .hg/requires $ hg id - abort: requirement 'fake' not supported! + abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)! [255] $ cd .. $ hg id test - abort: requirement 'fake' not supported! + abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)! [255]
--- a/tests/test-requires.t Tue May 31 19:16:18 2011 +0200 +++ b/tests/test-requires.t Tue May 31 19:16:25 2011 +0200 @@ -9,5 +9,5 @@ [255] $ echo indoor-pool > .hg/requires $ hg tip - abort: requirement 'indoor-pool' not supported! + abort: unknown repository format: requires feature 'indoor-pool' (upgrade Mercurial)! [255]