Help. I've screwed up my repo again, and I have no idea how.

Mathieu Lacage Mathieu.Lacage at
Fri Nov 3 06:42:05 CST 2006

On Thu, 2006-11-02 at 17:40 +0100, Thomas Arendsen Hein wrote:
> * Samuel Tardieu <sam at> [20061102 16:23]:
> > >>>>> "Thomas" == Thomas Arendsen Hein <thomas at> writes:
> > 
> > Thomas> $ hg commit
> > Thomas> Abort: Please specify a username. (see 'hg help username')
> > 
> > I like it, but I think this may turn some people off from using
> > Mercurial (some users are already afraid of using versioning systems).
> > 
> > What could be done instead is *ask* the user to provide a username,
> > such as in
> > 
> > % hg commit
> > Please configure your full name and email address:
> > Full name [default: Samuel Tardieu]: <wait for user input>
> > Email address [default: sam at]: <wait for user input>
> > 
> > and update ~/.hgrc appropriately.
> What should happen if you already have a ~/.hgrc which just doesn't
> set username? How verbose has the message to be explaining what
> happens now that you put in personal data here?
> I think it is important that Mercurial doesn't start to do things
> magically, this might annoy the experienced user and confuse the
> beginner.
> Unlike e.g. codeville we don't have a command to store some
> variables like username. If we had, you could just say:
> $ hg commit
> Abort: No username set, please use something like:
>   hg setconfig ui.username="foo <bar at>"
> People using the commit feature of versioning systems should be able
> to use an editor I think. Or do I make wrong assumtions here?

You are right but this sort of thing is just really handy. For example,
darcs always records the equivalent of default-push in the repository
upon the first push if there is none. And this does save the user a bit
of effort. I consider myself a not-too-smart user and this sort of thing
just saves time. I don't think it hampers the predictability of
mercurial behavior either.

I think that a repository-specific hgrc file which can be automagically
edited by mercurial would be quite useful in that it would decrease the
barrier to start using mercurial.


More information about the Mercurial mailing list