##// END OF EJS Templates
hgrc: search XDG_CONFIG_HOME on mac...
hgrc: search XDG_CONFIG_HOME on mac Searching for hgrc was special cased not to look through ~/.config/hg on Mac, but that’s unnecessary: Macs support it as do other unix based systems. There are plenty tools that use it there, e.g. git, and people expect it to work, e.g. "https://stackoverflow.com/questions/72499837/mercurial-on-macos-doesnt-read-config-hg-hgrc". Initial code introduced in 354020079723.

File last commit:

r52500:a4b3b8de default
r52500:a4b3b8de default
Show More
test-xdg.t
11 lines | 257 B | text/troff | Tads3Lexer
#if no-windows
$ 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 2>/dev/null
foobar
#endif