changeset 20715:b93791e0de25

require: provide a link to a wiki page in addition of suggesting upgrade The wiki page is intended to describe several solution to the requirement issue. Some of those solutions does not involve upgrading mercurial. That is very useful for people that can't easily upgrade they Mercurial in some place.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 25 Jun 2011 02:46:23 +0200
parents c152e538b85b
children 2115e035da11
files mercurial/scmutil.py tests/test-commit.t tests/test-identify.t tests/test-largefiles.t tests/test-requires.t
diffstat 5 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Tue Mar 11 16:52:15 2014 -0700
+++ b/mercurial/scmutil.py	Sat Jun 25 02:46:23 2011 +0200
@@ -735,7 +735,9 @@
     if missings:
         raise error.RequirementError(
             _("unknown repository format: requires features '%s' (upgrade "
-              "Mercurial)") % "', '".join(missings))
+              "Mercurial)") % "', '".join(missings),
+            hint=_("see http://mercurial.selenic.com/wiki/MissingRequirement"
+                   " for details"))
     return requirements
 
 class filecachesubentry(object):
--- a/tests/test-commit.t	Tue Mar 11 16:52:15 2014 -0700
+++ b/tests/test-commit.t	Sat Jun 25 02:46:23 2011 +0200
@@ -103,6 +103,7 @@
   $ echo fake >> .hg/requires
   $ hg commit -m bla
   abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
 
   $ cd ..
--- a/tests/test-identify.t	Tue Mar 11 16:52:15 2014 -0700
+++ b/tests/test-identify.t	Sat Jun 25 02:46:23 2011 +0200
@@ -114,11 +114,13 @@
   $ echo fake >> .hg/requires
   $ hg id
   abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
 
   $ cd ..
 #if no-outer-repo
   $ hg id test
   abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
 #endif
--- a/tests/test-largefiles.t	Tue Mar 11 16:52:15 2014 -0700
+++ b/tests/test-largefiles.t	Sat Jun 25 02:46:23 2011 +0200
@@ -2260,6 +2260,7 @@
   $TESTTMP/individualenabling/enabledlocally (glob)
   $ hg -R notenabledlocally root
   abort: unknown repository format: requires features 'largefiles' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
 
   $ hg init push-dst
@@ -2276,6 +2277,7 @@
 
   $ hg clone enabledlocally clone-dst
   abort: unknown repository format: requires features 'largefiles' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
   $ test -d clone-dst
   [1]
--- a/tests/test-requires.t	Tue Mar 11 16:52:15 2014 -0700
+++ b/tests/test-requires.t	Sat Jun 25 02:46:23 2011 +0200
@@ -10,10 +10,12 @@
   $ echo indoor-pool > .hg/requires
   $ hg tip
   abort: unknown repository format: requires features 'indoor-pool' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
   $ echo outdoor-pool >> .hg/requires
   $ hg tip
   abort: unknown repository format: requires features 'indoor-pool', 'outdoor-pool' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
   $ cd ..
 
@@ -61,6 +63,7 @@
 
   $ hg clone supported clone-dst
   abort: unknown repository format: requires features 'featuresetup-test' (upgrade Mercurial)!
+  (see http://mercurial.selenic.com/wiki/MissingRequirement for details)
   [255]
   $ hg clone --pull supported clone-dst
   abort: required features are not supported in the destination: featuresetup-test