Mercurial > hg
diff tests/test-subrepo @ 10378:e1401c74572f
subrepo: change default path in hgrc of subrepo after cloning
Previous behavior was to put in the cloned subrepos the path found in the original main repo.
However it isn't valid for relative path and it seems more logical to reference instead the subrepos
working copy path of the original main repo.
author | Saint Germain <saintger@gmail.com> |
---|---|
date | Sat, 06 Feb 2010 19:14:37 +0100 |
parents | 0bc93fa2cf2b |
children | e433002acb05 |
line wrap: on
line diff
--- a/tests/test-subrepo Sun Feb 07 15:31:53 2010 +0100 +++ b/tests/test-subrepo Sat Feb 06 19:14:37 2010 +0100 @@ -160,5 +160,27 @@ hg up 5 hg merge 4 # try to merge default into br again +cd .. + +echo % test repository cloning +mkdir mercurial mercurial2 +hg init nested_absolute +echo test > nested_absolute/foo +hg -R nested_absolute add +hg -R nested_absolute ci -mtest +cd mercurial +hg init nested_relative +echo test2 > nested_relative/foo2 +hg -R nested_relative add +hg -R nested_relative ci -mtest2 +hg init main +echo nested_relative = ../nested_relative > main/.hgsub +echo nested_absolute = $PWD/nested_absolute >> main/.hgsub +hg -R main add +hg -R main ci -m "add subrepos" +cd .. +hg clone mercurial/main mercurial2/main +cat mercurial2/main/nested_absolute/.hg/hgrc mercurial2/main/nested_relative/.hg/hgrc | sed "s:${PWD}:/tmp:" +rm -rf mercurial mercurial2 exit 0