sapling/eden/scm/tests/test-dynamicconfig-unicode.t
Xavier Deguillard 67db664778 dynamicconfig: read file as bytes
Summary:
Somehow reading the file with `open("r")` will try to decode it as ascii, but
that file may contain utf-8 characters, so open it as bytes, and then decode
it.

Reviewed By: DurhamG

Differential Revision: D22105188

fbshipit-source-id: 0cfbd8c5417b637dd76391f86226e24ee663baf7
2020-06-18 10:44:57 -07:00

26 lines
461 B
Perl

#chg-compatible
$ configure modern
$ setconfig configs.loaddynamicconfig=True
$ export HG_TEST_DYNAMICCONFIG="$TESTTMP/test_hgrc"
$ cat > test_hgrc <<EOF
> [section]
> key=
> EOF
$ hg init client
$ cd client
Verify it can be manually generated
$ hg debugdynamicconfig
$ cat .hg/hgrc.dynamic
# version=4.4.2* (glob)
# Generated by `hg debugdynamicconfig` - DO NOT MODIFY
[section]
key=
$ hg config section.key