Mercurial > hg-stable
diff tests/test-subrepo.t @ 14281:ccb7240acf32
subrepo: create subrepos using clone instead of pull
Subrepositories used to be created empty and then filled with data
using pull. This is wasteful when you do a clone from a local source
since it means that no hardlinks are created for the subrepos.
This patch make the hgsubrepo._get method check for an empty subrepo
and in that case do a clone instead of a pull. This brings in the same
data as before, but creates hardlinks when possible.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 09 May 2011 17:15:44 +0200 |
parents | 0748e18be470 |
children | ea7081645987 |
line wrap: on
line diff
--- a/tests/test-subrepo.t Mon May 09 16:41:45 2011 +0200 +++ b/tests/test-subrepo.t Mon May 09 17:15:44 2011 +0200 @@ -239,24 +239,9 @@ $ cd .. $ hg clone t tc updating to branch default - pulling subrepo s from $TESTTMP/sub/t/s - requesting all changes - adding changesets - adding manifests - adding file changes - added 4 changesets with 5 changes to 3 files - pulling subrepo s/ss from $TESTTMP/sub/t/s/ss - requesting all changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - pulling subrepo t from $TESTTMP/sub/t/t - requesting all changes - adding changesets - adding manifests - adding file changes - added 4 changesets with 4 changes to 1 files (+1 heads) + cloning subrepo s from $TESTTMP/sub/t/s + cloning subrepo s/ss from $TESTTMP/sub/t/s/ss + cloning subrepo t from $TESTTMP/sub/t/t 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd tc $ hg debugsub @@ -563,12 +548,7 @@ committing subrepository s $ hg clone repo repo2 updating to branch default - pulling subrepo s from $TESTTMP/sub/repo/s - requesting all changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files + cloning subrepo s from $TESTTMP/sub/repo/s 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -q -R repo2 pull -u $ echo 1 > repo2/s/a @@ -639,12 +619,7 @@ adding manifests adding file changes added 1 changesets with 2 changes to 2 files - pulling subrepo sub/repo from issue1852a/sub/repo - requesting all changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 1 files + cloning subrepo sub/repo from issue1852a/sub/repo 2 files updated, 0 files merged, 0 files removed, 0 files unresolved Try to push from the other side