changeset 21890:0f916db7f297

subrepo: add test whether "[paths]" is configured correctly at subrepo creation This test is added for changes in the subsequent patch. This test doesn't use "(glob)" for expected output, because "[paths]" is configured at subrepo creation by "_abssource()" using "posixpath.join()" to join path components.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 20 Jun 2014 00:41:31 +0900
parents ee7e8dcffc92
children db8a27d92818
files tests/test-subrepo.t
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-subrepo.t	Fri Jun 20 00:21:19 2014 +0900
+++ b/tests/test-subrepo.t	Fri Jun 20 00:41:31 2014 +0900
@@ -1359,3 +1359,32 @@
   $ hg phase -r .
   6: secret
   $ cd ../../
+
+Test that '[paths]' is configured correctly at subrepo creation
+
+  $ cd $TESTTMP/tc
+  $ cat > .hgsub <<EOF
+  > # to clear bogus subrepo path 'bogus=[boguspath'
+  > s = s
+  > t = t
+  > EOF
+  $ hg update -q --clean null
+  $ rm -rf s t
+  $ cat >> .hg/hgrc <<EOF
+  > [paths]
+  > default-push = /foo/bar
+  > EOF
+  $ hg update -q
+  $ cat s/.hg/hgrc
+  [paths]
+  default = $TESTTMP/t/s
+  default-push = /foo/bar/s
+  $ cat s/ss/.hg/hgrc
+  [paths]
+  default = $TESTTMP/t/s/ss
+  default-push = /foo/bar/s/ss
+  $ cat t/.hg/hgrc
+  [paths]
+  default = $TESTTMP/t/t
+  default-push = /foo/bar/t
+  $ cd ..