mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
27b08f102a
Summary: define `sl` as a shell function to `HGIDENTITY=sl hg` Reviewed By: quark-zju Differential Revision: D41965294 fbshipit-source-id: eb3eebb0dc184a3aae4bcb6ab541a42f9e8b82f8
47 lines
1.4 KiB
Perl
47 lines
1.4 KiB
Perl
#debugruntest-compatible
|
|
#chg-compatible
|
|
|
|
$ mkdir repo
|
|
$ cd repo
|
|
$ hg init
|
|
$ export PROGRAMDATA="C:\\ProgramData\\Facebook\\Mercurial\\"
|
|
$ export APPDATA="$TESTTMP\\AppData\\Roaming\\"
|
|
|
|
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
|
|
System config path: /etc/mercurial/system.rc (no-windows !)
|
|
System config path: C:\ProgramData\Facebook\Mercurial\Facebook\Mercurial\system.rc (windows !)
|
|
$ hg configfile --user
|
|
$TESTTMP/.hgrc
|
|
$ sl configfile --user
|
|
$TESTTMP/.config/sapling/sapling.conf (linux !)
|
|
$TESTTMP/Library/Preferences/sapling/sapling.conf (osx !)
|
|
$TESTTMP\AppData\Roaming\sapling\sapling.conf (windows !)
|
|
$ touch $TESTTMP/.hgrc
|
|
$ sl configfile --user
|
|
$TESTTMP/.hgrc
|
|
|
|
Test locating other configs
|
|
$ hg configfile --local
|
|
$TESTTMP/repo/.hg/hgrc
|
|
$ hg configfile --system
|
|
/etc/mercurial/system.rc (no-windows !)
|
|
C:\ProgramData\Facebook\Mercurial\Facebook\Mercurial\system.rc (windows !)
|
|
|
|
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 !)
|