mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
a9a16f92d8
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
23 lines
313 B
Perl
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
|