mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
e7d1102f9f
Modern applications must use the following paths to store configuration files: - $XDG_CONFIG_HOME/hg/hgrc, - $HOME/.config/hg/hgrc (if XDG_CONFIG_HOME is unset or not absolute). For backward compatibility, ~/.hgrc is still created if no hgrc exist using hg config --edit. See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
12 lines
252 B
Perl
12 lines
252 B
Perl
#if no-windows no-osx
|
|
|
|
$ mkdir -p xdgconf/hg
|
|
$ echo '[ui]' > xdgconf/hg/hgrc
|
|
$ echo 'username = foobar' >> xdgconf/hg/hgrc
|
|
$ XDG_CONFIG_HOME="`pwd`/xdgconf" ; export XDG_CONFIG_HOME
|
|
$ unset HGRCPATH
|
|
$ hg config ui.username
|
|
foobar
|
|
|
|
#endif
|