[PATCH] ui: change default for ui.askusername to True

Martin Geisler mg at lazybytes.net
Thu Oct 1 21:22:29 UTC 2009


Martin Geisler <mg at lazybytes.net> writes:

> # HG changeset patch
> # User Martin Geisler <mg at lazybytes.net>
> # Date 1254428034 -7200
> # Node ID 16736520d2ba272006e1733a64502c7ad5229edc
> # Parent  67df9f46f907e63446b9c7ec9cca2db540ecb160
> ui: change default for ui.askusername to True
>
> We regularly see people on IRC ask how they can correct commits they
> accidentally made without having configured a username.
>
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -177,8 +177,10 @@
>              user = self.config("ui", "username")
>          if user is None:
>              user = os.environ.get("EMAIL")
> -        if user is None and self.configbool("ui", "askusername"):
> +        if user is None and self.configbool("ui", "askusername", True):
>              user = self.prompt(_("enter a commit username:"), default=None)
> +            if user is not None:
> +                self.status(_("(set ui.username to make this permanent)"))

I don't think this message is very easy to understand for new users, but
I was unsure what to write instead. Asking them to edit the ~/.hgrc file
will look odd on Windows :-)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20091001/e5c14490/attachment.asc>


More information about the Mercurial-devel mailing list