# HG changeset patch # User Pierre-Yves David # Date 2021-01-29 10:42:27 # Node ID 4ae85340d5ebdb2e04f091bafdb1b581609e9489 # Parent 6894c9ef4dcd3511c9baf7cdce72a65b4385ccc8 config: add a test for priority when includes are involved Differential Revision: https://phab.mercurial-scm.org/D9915 diff --git a/tests/test-config.t b/tests/test-config.t --- a/tests/test-config.t +++ b/tests/test-config.t @@ -388,3 +388,26 @@ configs should be read in lexicographica > done $ HGRCPATH=configs hg config section.key 99 + +Configuration priority +====================== + +setup necessary file + + $ cat > file-A.rc << EOF + > [config-test] + > basic = value-A + > EOF + + $ cat > file-B.rc << EOF + > [config-test] + > basic = value-B + > EOF + +Simple order checking +--------------------- + +If file B is read after file A, value from B overwrite value from A. + + $ HGRCPATH="file-A.rc:file-B.rc" hg config config-test.basic + value-B