sapling/tests/test-include-fail.t
Gerardo Poggio a9a16f92d8 ignore all errors when including config file
Summary:
"hg" only ignored ENOENT errors when including files (so it didn't abort when an included file didn't exist). But it aborted on every other error (e.g EPERM).
This diff makes it ignore any IOError and just print a warning.

Reviewed By: quark-zju

Differential Revision: D7029320

fbshipit-source-id: b1b8137cd575fc89fb5967e8d18fe82ab84a8f85
2018-04-13 21:51:14 -07:00

23 lines
313 B
Perl

#require execbit
$ cat >> $HGRCPATH <<EOF
> [ui]
> foo = bar
> %include $TESTTMP/eperm/rc
> EOF
$ mkdir eperm
$ cat > $TESTTMP/eperm/rc <<EOF
> [ui]
> foo = baz
> EOF
$ hg config ui.foo
baz
An EPERM just causes the include to be ignored:
$ chmod -x eperm
$ hg config ui.foo
bar