Show More
@@ -1,57 +1,119 b'' | |||||
1 | #!/bin/sh |
|
1 | Preparing the subrepository 'sub2' | |
|
2 | ||||
|
3 | $ hg init sub2 | |||
|
4 | $ echo sub2 > sub2/sub2 | |||
|
5 | $ hg add -R sub2 | |||
|
6 | adding sub2/sub2 | |||
|
7 | $ hg commit -R sub2 -m "sub2 import" | |||
|
8 | ||||
|
9 | Preparing the 'sub1' repo which depends on the subrepo 'sub2' | |||
2 |
|
10 | |||
3 | echo % Preparing the subrepository 'sub2' |
|
11 | $ hg init sub1 | |
4 | hg init sub2 |
|
12 | $ echo sub1 > sub1/sub1 | |
5 |
|
|
13 | $ echo "sub2 = ../sub2" > sub1/.hgsub | |
6 | hg add -R sub2 |
|
14 | $ hg clone sub2 sub1/sub2 | sed 's/ .*sub/ ...sub/g' | |
7 | hg commit -R sub2 -m "sub2 import" |
|
15 | updating to branch default | |
|
16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
17 | $ hg add -R sub1 | |||
|
18 | adding sub1/.hgsub | |||
|
19 | adding sub1/sub1 | |||
|
20 | $ hg commit -R sub1 -m "sub1 import" | |||
|
21 | committing subrepository sub2 | |||
|
22 | ||||
|
23 | Preparing the 'main' repo which depends on the subrepo 'sub1' | |||
8 |
|
24 | |||
9 | echo % Preparing the 'sub1' repo which depends on the subrepo 'sub2' |
|
25 | $ hg init main | |
10 | hg init sub1 |
|
26 | $ echo main > main/main | |
11 | echo sub1 > sub1/sub1 |
|
27 | $ echo "sub1 = ../sub1" > main/.hgsub | |
12 | echo "sub2 = ../sub2" > sub1/.hgsub |
|
28 | $ hg clone sub1 main/sub1 | sed 's/ .*sub/ ...sub/g' | |
13 | hg clone sub2 sub1/sub2 | sed 's/ .*sub/ ...sub/g' |
|
29 | updating to branch default | |
14 | hg add -R sub1 |
|
30 | pulling ...sub2 | |
15 | hg commit -R sub1 -m "sub1 import" |
|
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 | |||
|
37 | $ hg add -R main | |||
|
38 | adding main/.hgsub | |||
|
39 | adding main/main | |||
|
40 | $ hg commit -R main -m "main import" | |||
|
41 | committing subrepository sub1 | |||
16 |
|
42 | |||
17 | echo % Preparing the 'main' repo which depends on the subrepo 'sub1' |
|
43 | Cleaning both repositories, just as a clone -U | |
18 | hg init main |
|
44 | ||
19 | echo main > main/main |
|
45 | $ hg up -C -R sub2 null | |
20 | echo "sub1 = ../sub1" > main/.hgsub |
|
46 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
21 | hg clone sub1 main/sub1 | sed 's/ .*sub/ ...sub/g' |
|
47 | $ hg up -C -R sub1 null | |
22 | hg add -R main |
|
48 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
23 | hg commit -R main -m "main import" |
|
49 | $ hg up -C -R main null | |
|
50 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |||
|
51 | $ rm -rf main/sub1 | |||
|
52 | $ rm -rf sub1/sub2 | |||
|
53 | ||||
|
54 | Clone main | |||
24 |
|
55 | |||
25 | echo % Cleaning both repositories, just as a clone -U |
|
56 | $ hg clone main cloned | sed 's/ .*sub/ ...sub/g' | |
26 | hg up -C -R sub2 null |
|
57 | updating to branch default | |
27 | hg up -C -R sub1 null |
|
58 | pulling ...sub1 | |
28 | hg up -C -R main null |
|
59 | requesting all changes | |
29 | rm -rf main/sub1 |
|
60 | adding changesets | |
30 | rm -rf sub1/sub2 |
|
61 | adding manifests | |
|
62 | adding file changes | |||
|
63 | added 1 changesets with 3 changes to 3 files | |||
|
64 | pulling ...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 | |||
31 |
|
71 | |||
32 | echo % Clone main |
|
72 | Checking cloned repo ids | |
33 | hg clone main cloned | sed 's/ .*sub/ ...sub/g' |
|
|||
34 |
|
73 | |||
35 | echo % Checking cloned repo ids |
|
74 | $ printf "cloned " ; hg id -R cloned | |
36 | printf "cloned " ; hg id -R cloned |
|
75 | cloned 7f491f53a367 tip | |
37 | printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
76 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 | |
38 | printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
77 | cloned/sub1 fc3b4ce2696f tip | |
|
78 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 | |||
|
79 | cloned/sub1/sub2 c57a0840e3ba tip | |||
|
80 | ||||
|
81 | debugsub output for main and sub1 | |||
39 |
|
82 | |||
40 | echo % debugsub output for main and sub1 |
|
83 | $ hg debugsub -R cloned | |
41 | hg debugsub -R cloned |
|
84 | path sub1 | |
42 | hg debugsub -R cloned/sub1 |
|
85 | source ../sub1 | |
|
86 | revision fc3b4ce2696f7741438c79207583768f2ce6b0dd | |||
|
87 | $ hg debugsub -R cloned/sub1 | |||
|
88 | path sub2 | |||
|
89 | source ../sub2 | |||
|
90 | revision c57a0840e3badd667ef3c3ef65471609acb2ba3c | |||
43 |
|
91 | |||
44 |
|
|
92 | Modifying deeply nested 'sub2' | |
45 | echo modified > cloned/sub1/sub2/sub2 |
|
93 | ||
46 | hg commit -m "deep nested modif should trigger a commit" -R cloned |
|
94 | $ echo modified > cloned/sub1/sub2/sub2 | |
|
95 | $ hg commit -m "deep nested modif should trigger a commit" -R cloned | |||
|
96 | committing subrepository sub1 | |||
|
97 | committing subrepository sub1/sub2 | |||
|
98 | ||||
|
99 | Checking modified node ids | |||
47 |
|
100 | |||
48 | echo % Checking modified node ids |
|
101 | $ printf "cloned " ; hg id -R cloned | |
49 | printf "cloned " ; hg id -R cloned |
|
102 | cloned ffe6649062fe tip | |
50 | printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
103 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 | |
51 | printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
104 | cloned/sub1 2ecb03bf44a9 tip | |
|
105 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 | |||
|
106 | cloned/sub1/sub2 53dd3430bcaf tip | |||
|
107 | ||||
|
108 | debugsub output for main and sub1 | |||
52 |
|
109 | |||
53 | echo % debugsub output for main and sub1 |
|
110 | $ hg debugsub -R cloned | |
54 | hg debugsub -R cloned |
|
111 | path sub1 | |
55 | hg debugsub -R cloned/sub1 |
|
112 | source ../sub1 | |
|
113 | revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9 | |||
|
114 | $ hg debugsub -R cloned/sub1 | |||
|
115 | path sub2 | |||
|
116 | source ../sub2 | |||
|
117 | revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487 | |||
56 |
|
118 | |||
57 | exit 0 |
|
119 | $ exit 0 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now