Mercurial > hg
comparison tests/test-subrepo-deep-nested-change.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 | 6cc4b14fb76b |
children | e174353e8cda |
comparison
equal
deleted
inserted
replaced
14280:98e4d3914c2e | 14281:ccb7240acf32 |
---|---|
25 $ hg init main | 25 $ hg init main |
26 $ echo main > main/main | 26 $ echo main > main/main |
27 $ echo "sub1 = ../sub1" > main/.hgsub | 27 $ echo "sub1 = ../sub1" > main/.hgsub |
28 $ hg clone sub1 main/sub1 | 28 $ hg clone sub1 main/sub1 |
29 updating to branch default | 29 updating to branch default |
30 pulling subrepo sub2 from $TESTTMP/sub2 | 30 cloning subrepo sub2 from $TESTTMP/sub2 |
31 requesting all changes | |
32 adding changesets | |
33 adding manifests | |
34 adding file changes | |
35 added 1 changesets with 1 changes to 1 files | |
36 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 31 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
37 $ hg add -R main | 32 $ hg add -R main |
38 adding main/.hgsub | 33 adding main/.hgsub |
39 adding main/main | 34 adding main/main |
40 $ hg commit -R main -m "main import" | 35 $ hg commit -R main -m "main import" |
53 | 48 |
54 Clone main | 49 Clone main |
55 | 50 |
56 $ hg clone main cloned | 51 $ hg clone main cloned |
57 updating to branch default | 52 updating to branch default |
58 pulling subrepo sub1 from $TESTTMP/sub1 | 53 cloning subrepo sub1 from $TESTTMP/sub1 |
59 requesting all changes | 54 cloning subrepo sub1/sub2 from $TESTTMP/sub2 |
60 adding changesets | |
61 adding manifests | |
62 adding file changes | |
63 added 1 changesets with 3 changes to 3 files | |
64 pulling subrepo sub1/sub2 from $TESTTMP/sub2 | |
65 requesting all changes | |
66 adding changesets | |
67 adding manifests | |
68 adding file changes | |
69 added 1 changesets with 1 changes to 1 files | |
70 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 55 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
71 | 56 |
72 Checking cloned repo ids | 57 Checking cloned repo ids |
73 | 58 |
74 $ printf "cloned " ; hg id -R cloned | 59 $ printf "cloned " ; hg id -R cloned |