diff tests/test-subrepo.t @ 34986:828cf35f1de6 stable

subrepo: extend config option to disable subrepos by type (SEC) This allows us to minimize the behavior change introduced by the next patch. I have no idea which config style is preferred in UX POV, but I decided to get things done. a) list: 'allowed = hg, git, svn' b) sub option: 'allowed.hg = True' or 'allowed:hg = True' c) per-type action: 'hg = allow', 'git = abort'
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Nov 2017 21:48:58 +0900
parents 5e27afeddaee
children 1a314176da9c
line wrap: on
line diff
--- a/tests/test-subrepo.t	Sun Nov 05 21:22:07 2017 +0900
+++ b/tests/test-subrepo.t	Sun Nov 05 21:48:58 2017 +0900
@@ -488,22 +488,30 @@
 
 clone with subrepo disabled (update should fail)
 
-  $ hg clone t -U tc2 --config subrepos.allowed=false
-  $ hg update -R tc2 --config subrepos.allowed=false
-  abort: subrepo not allowed
+  $ hg clone t -U tc2 --config subrepos.allowed=
+  $ hg update -R tc2 --config subrepos.allowed=
+  abort: subrepo type hg not allowed
   (see 'hg help config.subrepos' for details)
   [255]
   $ ls tc2
   a
 
-  $ hg clone t tc3 --config subrepos.allowed=false
+  $ hg clone t tc3 --config subrepos.allowed=
   updating to branch default
-  abort: subrepo not allowed
+  abort: subrepo type hg not allowed
   (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
+  (see 'hg help config.subrepos' for details)
+  [255]
+  $ ls tc4
+  a
+
 push
 
   $ cd tc