mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
improve suggestion for setting username
Summary: Update instructions to: - suggest `--user` instead of `--edit` - edit config via CLI directly without opening an editor I also noticed that currently, on Windows, trying to open an editor to edit a config attempts to use `vi` by default, which fails. Reviewed By: zzl0 Differential Revision: D41062921 fbshipit-source-id: faac2a897a63939d7fb03d3ab6d11851e951c05f
This commit is contained in:
parent
c2b84cc9e6
commit
91272802fb
@ -600,7 +600,9 @@ class ui(object):
|
||||
if not user:
|
||||
raise error.Abort(
|
||||
_("no username supplied"),
|
||||
hint=_("use '@prog@ config --edit' " "to set your username"),
|
||||
hint=_(
|
||||
'use `@prog@ config --user ui.username "First Last <me@example.com>"` to set your username'
|
||||
),
|
||||
)
|
||||
if "\n" in user:
|
||||
raise error.Abort(_("username %s contains a newline\n") % repr(user))
|
||||
|
@ -281,7 +281,7 @@ Modify end of plain file with username unset
|
||||
$ unset HGUSER
|
||||
$ hg commit -i --config ui.username= -d '8 0' -m end plain
|
||||
abort: no username supplied
|
||||
(use 'hg config --edit' to set your username)
|
||||
(use `hg config --user ui.username "First Last <me@example.com>"` to set your username)
|
||||
[255]
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
$ echo "username = " >> .hg/hgrc
|
||||
$ hg commit -m commit-1
|
||||
abort: no username supplied
|
||||
(use 'hg config --edit' to set your username)
|
||||
(use `hg config --user ui.username "First Last <me@example.com>"` to set your username)
|
||||
[255]
|
||||
|
||||
# test alternate config var
|
||||
|
Loading…
Reference in New Issue
Block a user