2022-10-26 03:15:44 +03:00
|
|
|
#debugruntest-compatible
|
|
|
|
#chg-compatible
|
|
|
|
|
|
|
|
$ mkdir repo
|
|
|
|
$ cd repo
|
|
|
|
$ hg init
|
2022-10-27 07:04:01 +03:00
|
|
|
$ export PROGRAMDATA="C:\\ProgramData\\Facebook\\Mercurial\\"
|
|
|
|
$ export APPDATA="$TESTTMP\\AppData\\Roaming\\"
|
2022-10-26 03:15:44 +03:00
|
|
|
|
|
|
|
Test errors
|
|
|
|
$ hg configfile --user --local
|
|
|
|
abort: must select at most one of --user, --local, or --system
|
|
|
|
[255]
|
|
|
|
$ hg --cwd ../ configfile --local
|
|
|
|
abort: --local must be used inside a repo
|
|
|
|
[255]
|
|
|
|
|
|
|
|
Test locating user config
|
|
|
|
$ hg configfile
|
|
|
|
User config path: $TESTTMP/.hgrc
|
|
|
|
Repo config path: $TESTTMP/repo/.hg/hgrc
|
2022-10-27 07:04:01 +03:00
|
|
|
System config path: /etc/mercurial/system.rc (no-windows !)
|
|
|
|
System config path: C:\ProgramData\Facebook\Mercurial\Facebook\Mercurial\system.rc (windows !)
|
2022-10-26 03:15:44 +03:00
|
|
|
$ hg configfile --user
|
|
|
|
$TESTTMP/.hgrc
|
2022-12-14 00:03:36 +03:00
|
|
|
$ sl configfile --user
|
2022-10-27 07:04:01 +03:00
|
|
|
$TESTTMP/.config/sapling/sapling.conf (linux !)
|
|
|
|
$TESTTMP/Library/Preferences/sapling/sapling.conf (osx !)
|
|
|
|
$TESTTMP\AppData\Roaming\sapling\sapling.conf (windows !)
|
2022-10-26 03:15:44 +03:00
|
|
|
$ touch $TESTTMP/.hgrc
|
2022-12-14 00:03:36 +03:00
|
|
|
$ sl configfile --user
|
2022-10-26 03:15:44 +03:00
|
|
|
$TESTTMP/.hgrc
|
|
|
|
|
|
|
|
Test locating other configs
|
|
|
|
$ hg configfile --local
|
|
|
|
$TESTTMP/repo/.hg/hgrc
|
|
|
|
$ hg configfile --system
|
2022-10-27 07:04:01 +03:00
|
|
|
/etc/mercurial/system.rc (no-windows !)
|
|
|
|
C:\ProgramData\Facebook\Mercurial\Facebook\Mercurial\system.rc (windows !)
|
2022-11-15 23:53:57 +03:00
|
|
|
|
|
|
|
Test outside a repo
|
|
|
|
$ cd
|
|
|
|
$ hg configfile
|
|
|
|
User config path: $TESTTMP/.hgrc
|
|
|
|
System config path: /etc/mercurial/system.rc (no-windows !)
|
|
|
|
System config path: C:\ProgramData\Facebook\Mercurial\Facebook\Mercurial\system.rc (windows !)
|