Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-git.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 | 846942fd6d15 |
children | 4c04fd032af6 |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Mon Nov 06 14:56:17 2017 -0500 +++ b/tests/test-subrepo-git.t Mon Nov 06 22:32:41 2017 -0800 @@ -45,7 +45,7 @@ git subrepo is disabled by default $ hg commit -m 'new git subrepo' - abort: subrepo type git not allowed + abort: git subrepos not allowed (see 'hg help config.subrepos' for details) [255] @@ -53,7 +53,7 @@ $ cat >> $HGRCPATH <<EOF > [subrepos] - > allowed = hg, git + > git:allowed = true > EOF $ hg commit -m 'new git subrepo' @@ -106,30 +106,22 @@ 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 git 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 git not allowed + abort: subrepos not enabled (see 'hg help config.subrepos' for details) [255] $ ls tc3 a - $ hg clone t tc4 --config subrepos.allowed=hg - updating to branch default - abort: subrepo type git not allowed - (see 'hg help config.subrepos' for details) - [255] - $ ls tc4 - a - update to previous substate $ cd tc