[PATCH] ui: change default for ui.askusername to True
TK Soh
teekaysoh at gmail.com
Fri Oct 2 02:34:04 UTC 2009
On Thu, Oct 1, 2009 at 9:22 PM, Martin Geisler <mg at lazybytes.net> wrote:
> 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 :-)
Would something like "set username setting in [ui] section to make
this permanent" be more obviously? I often too feel that the
ui.username syntax is unclear to new users, though it's certainly
simpler to write once you know what it means.
> --
> Martin Geisler
>
> VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
> SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
>
More information about the Mercurial-devel
mailing list