[PATCH 5 of 9] repo: clarify 'requires feature' error further, suggest enabling the feature

Mads Kiilerich mads at kiilerich.com
Wed Mar 19 06:45:58 CDT 2014


On 03/19/2014 03:59 AM, Siddharth Agarwal wrote:
> On 03/18/2014 04:33 PM, Mads Kiilerich wrote:
>>               _("unknown repository format: requires features '%s' 
>> (upgrade "
>> -              "Mercurial)") % "', '".join(missings),
>> +              "Mercurial or enable feature)") % "', '".join(missings),
>
> Could you turn this into a hint, please?

Your aggressive trimming lost important context. There is already a hint:

--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -735,7 +735,7 @@ def readrequires(opener, supported):
      if missings:
          raise error.RequirementError(
              _("unknown repository format: requires features '%s' (upgrade "
-              "Mercurial)") % "', '".join(missings),
+              "Mercurial or enable feature)") % "', '".join(missings),
              hint=_("seehttp://mercurial.selenic.com/wiki/MissingRequirement"
                     " for details"))
      return requirements


It must thus more be a comment to http://selenic.com/hg/rev/b93791e0de25 
. Why did that changeset add a "real" Abort hint while keeping the 
parens in the primary abort message?

/Mads


More information about the Mercurial-devel mailing list