Improving requirement error message

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 21 19:44:52 CDT 2011


Here is a reset of the discussion about improving the current requirement error message.

Timing is very tight, I suggest:

- 2011-06-22 People give view about what should be fixed,
- 2011-06-23 People agree on a new phrasing for the message,
- 2011-06-24 patch is written (before pre-release).

Bellow are points I believe necessary to be covered by this error message.

Issue with the current message:
====================

Lack hint about how to solve the issue
--------------------
This is the main issue in my opinion.

The user just get the error and have no clue about how to handle it. 

- Having a dedicated help entry may help but it won't be made for 1.9.0,

- linking to a dedicated page on the wiki seems necessary anyway. We need to update new requirement which are by definition unknown by the version that get the error.

Only display the first missing feature
--------------------
Hiding the full issue to the user might be very frustrating. This is something to fix in my opinion

The goal is to avoid the following scenario:

1) Bob using version 1.6 try to access repo created with dotencode+generaldelta,
2) Bob get an error --> abort: […] requires features 'dotencode',
3) Bob check the wiki see that dotencode is introduced in 1.7,
4) Bob install version 1.8.0 (may include fighting with IT departement),
5) Bob get an error --> abort: […] requires features 'generaldelta',
6) Bob check the wiki see that generaldelta is introduced in 1.9,
7) Bob install version 1.9.0 (may include fighting with IT departement).
8) Bob access it's repo (at last).

Note:

Version and requirement used here are for demo purpose only as version prior 1.9
wont have this changeset.

Such scenario are far from pure theorycraft, current mercurial version in debian
stable (squeeze) is 1.6.x. Current mercurial version in stable-backport is
1.8.4.


Does not make explicit that only the action of reading a local repository raise the error.
--------------------

There is *only* one case were Mercurial don't preserve backward compatibility. Highlighting that this error is the only one user can encounter is better. Being more explicit will make user more confident in the process of upgrading mercurial in general.

Need to be explicit that the issue comes from the version of hg used (vs the version that created this repo).
--------------------

Having an explicit reference to a "version issue" make the error less mysterious. (The current message say "upgrade mercurial" to cover this point)



Have fun commenting the issue

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list