sapling/tests/test-arcconfig.t
Wez Furlong 12a08e0a47 add arcconfig accessors
Summary:
This is here to support other arcanist/phabrication integration
modules.

Note: this adds a new package.  I'm not sure what the packaging ramifications
are exactly, but surely there are some as other extensions start to depend on
this.

Test Plan:
integration test is provided:

```
$ ../../hg-crew/tests/run-tests.py -j8
....................................................
# Ran 52 tests, 0 skipped, 0 warned, 0 failed.
```

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3215615
2016-04-27 09:27:56 -07:00

27 lines
660 B
Perl

$ cat >> $HGRCPATH << EOF
> [extensions]
> arcconfig=$TESTDIR/../phabricator/arcconfig.py
> EOF
Sanity check expectations when there is no arcconfig
$ hg init repo
$ cd repo
$ hg debugarcconfig
abort: no .arcconfig found
[255]
Show that we can locate and reflect the contents of the .arcconfig from
the repo dir
$ echo '{"hello": "world"}' > .arcconfig
$ hg debugarcconfig
{"_arcconfig_path": "$TESTTMP/repo", "hello": "world"}
We expect to see the combination of the user arcrc and the repo rc
$ echo '{"user": true}' > $HOME/.arcrc
$ hg debugarcconfig
{"_arcconfig_path": "$TESTTMP/repo", "hello": "world", "user": true}