[PATCH 0 of 6] Improve requirement error message

Adrian Buehlmann adrian at cadifra.com
Sun Jun 19 13:39:42 CDT 2011


On 2011-06-19 19:37, Martin Geisler wrote:
> Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:
> 
>> On 18 juin 2011, at 13:09, Pierre-Yves David wrote:
>>
>>> This series propose several improvements to the error message raise
>>> by missing requirements.
> 
> I think this is a great idea!
> 
>> I forget to include sample output
>>
>> Before:
>>
>>> abort: unknown repository format: requires feature 'dotencode'
>>> (upgrade Mercurial)
>>
>> This series proposal:
>>
>>> abort: Mercurial 1.6.4 can not read this local repository!
>>>        It requires features: 'dotencore', 'generaldelta'.
>>> (see http://mercurial.selenic.com/wiki/RequiresFile for details)
> 
> Like Wagner, I don't think we should indent the line -- we don't do that
> in any of our other messages. Putting both messages into the same _ call
> will also be a good idea for translators.
> 
>> We may even add an informative file with the version of mercurial used
>> when creating a repo to display
>>
>>> Mercurial 1.6.4 can not read this local repository created with a
>>> newer mercurial version (1.9.1)
> 
> I think adding such a file is a good idea.
> 
> An alternative would be to begin adding a version number to our
> requirements -- name it 'foo-1.9' instead of 'foo'. That way we can tell
> the user the minimum version he needs to upgrade to in order to use the
> repository.

Why would anyone not just upgrade to the currently released latest
version, which has all features (and bugfixes) by definition?

And I'd recommend to keep mercurial version numbers out of the mercurial
code base (even if it's just for requirement names).

Mercurial project version numbers are pretty much meaningless for any
derived project which just use the mercurial code base.






More information about the Mercurial-devel mailing list