Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo.t @ 34967:1a314176da9c stable
subrepo: use per-type config options to enable subrepos
We change subrepos.allowed from a list of allowed subrepo types to
a combination of a master switch and per-type boolean flag.
If the master switch is set, subrepos can be disabled wholesale.
If subrepos are globally enabled, then per-type options are
consulted. Mercurial repos are enabled by default. Everything else
is disabled by default.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 06 Nov 2017 22:32:41 -0800 |
parents | 828cf35f1de6 |
children | 27196b7fc1ac |
line wrap: on
line diff
--- a/tests/test-subrepo.t Mon Nov 06 14:56:17 2017 -0500 +++ b/tests/test-subrepo.t Mon Nov 06 22:32:41 2017 -0800 @@ -488,30 +488,40 @@ clone with subrepo disabled (update should fail) - $ hg clone t -U tc2 --config subrepos.allowed= - $ hg update -R tc2 --config subrepos.allowed= - abort: subrepo type hg not allowed + $ hg clone t -U tc2 --config subrepos.allowed=false + $ hg update -R tc2 --config subrepos.allowed=false + abort: subrepos not enabled (see 'hg help config.subrepos' for details) [255] $ ls tc2 a - $ hg clone t tc3 --config subrepos.allowed= + $ hg clone t tc3 --config subrepos.allowed=false updating to branch default - abort: subrepo type hg not allowed + abort: subrepos not enabled (see 'hg help config.subrepos' for details) [255] $ ls tc3 a - $ hg clone t tc4 --config subrepos.allowed=git - updating to branch default - abort: subrepo type hg not allowed +And again with just the hg type disabled + + $ hg clone t -U tc4 --config subrepos.hg:allowed=false + $ hg update -R tc4 --config subrepos.hg:allowed=false + abort: hg subrepos not allowed (see 'hg help config.subrepos' for details) [255] $ ls tc4 a + $ hg clone t tc5 --config subrepos.hg:allowed=false + updating to branch default + abort: hg subrepos not allowed + (see 'hg help config.subrepos' for details) + [255] + $ ls tc5 + a + push $ cd tc