[PATCH 0 of 6] Improve requirement error message

Martin Geisler mg at lazybytes.net
Sun Jun 19 12:37:19 CDT 2011


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.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110619/7fead109/attachment.pgp>


More information about the Mercurial-devel mailing list