# HG changeset patch # User Adrian Buehlmann # Date 1306862185 -7200 # Node ID 973959fbe8ec84ef572eba8ab3f8d54c1e3e6808 # Parent 58b36e9ea78368ac80c0a9808243fe2847443e67 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! diff -r 58b36e9ea783 -r 973959fbe8ec mercurial/scmutil.py --- 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 diff -r 58b36e9ea783 -r 973959fbe8ec tests/test-commit.t --- 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 .. diff -r 58b36e9ea783 -r 973959fbe8ec tests/test-identify.t --- 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] diff -r 58b36e9ea783 -r 973959fbe8ec tests/test-requires.t --- 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]