# HG changeset patch # User Pierre-Yves David # Date 1611918209 -3600 # Node ID 702bb73d7330af19a23accbe70303c0156e2b2d2 # Parent 377689cc295f09a2c5ed52563d39262a9590f56f config: test priority involving alias and include Differential Revision: https://phab.mercurial-scm.org/D9919 diff -r 377689cc295f -r 702bb73d7330 tests/test-config.t --- a/tests/test-config.t Fri Jan 29 12:02:28 2021 +0100 +++ b/tests/test-config.t Fri Jan 29 12:03:29 2021 +0100 @@ -418,6 +418,29 @@ > post-include= value-included > EOF + $ cat > file-C.rc << EOF + > %include ./included-alias-C.rc + > [ui] + > logtemplate = "value-C\n" + > EOF + + $ cat > included-alias-C.rc << EOF + > [command-templates] + > log = "value-included\n" + > EOF + + + $ cat > file-D.rc << EOF + > [command-templates] + > log = "value-D\n" + > %include ./included-alias-D.rc + > EOF + + $ cat > included-alias-D.rc << EOF + > [ui] + > logtemplate = "value-included\n" + > EOF + Simple order checking --------------------- @@ -462,3 +485,16 @@ $ HGRCPATH="file-A.rc:file-B.rc" hg log -r . value-A (known-bad-output !) value-B (missing-correct-output !) + +Alias and include +----------------- + +The pre/post include priority should also apply when tie-breaking alternatives. +See the case above for details about the two config options used. + + $ HGRCPATH="file-C.rc" hg log -r . + value-included (known-bad-output !) + value-C (missing-correct-output !) + $ HGRCPATH="file-D.rc" hg log -r . + value-D (known-bad-output !) + value-included (missing-correct-output !)