Abort when no username is found

Greg Ward greg-hg at gerg.ca
Tue Oct 20 21:01:14 UTC 2009


On Mon, Oct 19, 2009 at 6:38 PM, Martin Geisler <mg at lazybytes.net> wrote:
> I've just pushed c63c336ee2f7 which makes Mercurial abort when you make
> a commit without having configured a username. The message you get is:

Excellent!

>  Please specify a username.
>
> How can we improve this message? We need to include information about
> how one can specify the username. We talked on IRC about making a new
> help topic, I imagine it could be called 'hgrc'. That would let us write
>
>  please specify a username, see "hg help hgrc"

You can't just jam two sentences together with a comma in English!
Acceptable alternatives:

  please specify a username; see "hg help hgrc"
  please specify a username: see "hg help hgrc"
  please specify a username (see "hg help hgrc")

Also: how about "hg help config[uration]" instead?  "hgrc" is very
much Unix-speak and probably not at all clear to anyone who has not
been using Unix for years.  It's OK for a man page, but I think help
topics should be a bit less opaque.

And, for the error message itself: what about "no username supplied".
"Please specify" is so, I dunno, touchy-feely.  ;-)  I mean, the error
will be prefixed with "abort: ", right?  IMHO

  abort: no username supplied (see "hg help configuration")

is a pretty good error message: clear, concise, accurate, and complete.

Greg




More information about the Mercurial-devel mailing list