Show More
@@ -1,622 +1,665 b'' | |||||
1 | Create test repository: |
|
1 | Create test repository: | |
2 |
|
2 | |||
3 | $ hg init repo |
|
3 | $ hg init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 | $ echo x1 > x.txt |
|
5 | $ echo x1 > x.txt | |
6 |
|
6 | |||
7 | $ hg init foo |
|
7 | $ hg init foo | |
8 | $ cd foo |
|
8 | $ cd foo | |
9 | $ echo y1 > y.txt |
|
9 | $ echo y1 > y.txt | |
10 |
|
10 | |||
11 | $ hg init bar |
|
11 | $ hg init bar | |
12 | $ cd bar |
|
12 | $ cd bar | |
13 | $ echo z1 > z.txt |
|
13 | $ echo z1 > z.txt | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 | $ echo 'bar = bar' > .hgsub |
|
16 | $ echo 'bar = bar' > .hgsub | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ echo 'foo = foo' > .hgsub |
|
19 | $ echo 'foo = foo' > .hgsub | |
20 |
|
20 | |||
21 | Add files --- .hgsub files must go first to trigger subrepos: |
|
21 | Add files --- .hgsub files must go first to trigger subrepos: | |
22 |
|
22 | |||
23 | $ hg add -S .hgsub |
|
23 | $ hg add -S .hgsub | |
24 | $ hg add -S foo/.hgsub |
|
24 | $ hg add -S foo/.hgsub | |
25 | $ hg add -S foo/bar |
|
25 | $ hg add -S foo/bar | |
26 | adding foo/bar/z.txt |
|
26 | adding foo/bar/z.txt | |
27 | $ hg add -S |
|
27 | $ hg add -S | |
28 | adding x.txt |
|
28 | adding x.txt | |
29 | adding foo/y.txt |
|
29 | adding foo/y.txt | |
30 |
|
30 | |||
31 | Test recursive status without committing anything: |
|
31 | Test recursive status without committing anything: | |
32 |
|
32 | |||
33 | $ hg status -S |
|
33 | $ hg status -S | |
34 | A .hgsub |
|
34 | A .hgsub | |
35 | A foo/.hgsub |
|
35 | A foo/.hgsub | |
36 | A foo/bar/z.txt |
|
36 | A foo/bar/z.txt | |
37 | A foo/y.txt |
|
37 | A foo/y.txt | |
38 | A x.txt |
|
38 | A x.txt | |
39 |
|
39 | |||
40 | Test recursive diff without committing anything: |
|
40 | Test recursive diff without committing anything: | |
41 |
|
41 | |||
42 | $ hg diff --nodates -S foo |
|
42 | $ hg diff --nodates -S foo | |
43 | diff -r 000000000000 foo/.hgsub |
|
43 | diff -r 000000000000 foo/.hgsub | |
44 | --- /dev/null |
|
44 | --- /dev/null | |
45 | +++ b/foo/.hgsub |
|
45 | +++ b/foo/.hgsub | |
46 | @@ -0,0 +1,1 @@ |
|
46 | @@ -0,0 +1,1 @@ | |
47 | +bar = bar |
|
47 | +bar = bar | |
48 | diff -r 000000000000 foo/y.txt |
|
48 | diff -r 000000000000 foo/y.txt | |
49 | --- /dev/null |
|
49 | --- /dev/null | |
50 | +++ b/foo/y.txt |
|
50 | +++ b/foo/y.txt | |
51 | @@ -0,0 +1,1 @@ |
|
51 | @@ -0,0 +1,1 @@ | |
52 | +y1 |
|
52 | +y1 | |
53 | diff -r 000000000000 foo/bar/z.txt |
|
53 | diff -r 000000000000 foo/bar/z.txt | |
54 | --- /dev/null |
|
54 | --- /dev/null | |
55 | +++ b/foo/bar/z.txt |
|
55 | +++ b/foo/bar/z.txt | |
56 | @@ -0,0 +1,1 @@ |
|
56 | @@ -0,0 +1,1 @@ | |
57 | +z1 |
|
57 | +z1 | |
58 |
|
58 | |||
59 | Commits: |
|
59 | Commits: | |
60 |
|
60 | |||
61 | $ hg commit -m fails |
|
61 | $ hg commit -m fails | |
62 | abort: uncommitted changes in subrepository "foo" |
|
62 | abort: uncommitted changes in subrepository "foo" | |
63 | (use --subrepos for recursive commit) |
|
63 | (use --subrepos for recursive commit) | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | The --subrepos flag overwrite the config setting: |
|
66 | The --subrepos flag overwrite the config setting: | |
67 |
|
67 | |||
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos |
|
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos | |
69 | committing subrepository foo |
|
69 | committing subrepository foo | |
70 | committing subrepository foo/bar |
|
70 | committing subrepository foo/bar | |
71 |
|
71 | |||
72 | $ cd foo |
|
72 | $ cd foo | |
73 | $ echo y2 >> y.txt |
|
73 | $ echo y2 >> y.txt | |
74 | $ hg commit -m 0-1-0 |
|
74 | $ hg commit -m 0-1-0 | |
75 |
|
75 | |||
76 | $ cd bar |
|
76 | $ cd bar | |
77 | $ echo z2 >> z.txt |
|
77 | $ echo z2 >> z.txt | |
78 | $ hg commit -m 0-1-1 |
|
78 | $ hg commit -m 0-1-1 | |
79 |
|
79 | |||
80 | $ cd .. |
|
80 | $ cd .. | |
81 | $ hg commit -m 0-2-1 |
|
81 | $ hg commit -m 0-2-1 | |
82 |
|
82 | |||
83 | $ cd .. |
|
83 | $ cd .. | |
84 | $ hg commit -m 1-2-1 |
|
84 | $ hg commit -m 1-2-1 | |
85 |
|
85 | |||
86 | Change working directory: |
|
86 | Change working directory: | |
87 |
|
87 | |||
88 | $ echo y3 >> foo/y.txt |
|
88 | $ echo y3 >> foo/y.txt | |
89 | $ echo z3 >> foo/bar/z.txt |
|
89 | $ echo z3 >> foo/bar/z.txt | |
90 | $ hg status -S |
|
90 | $ hg status -S | |
91 | M foo/bar/z.txt |
|
91 | M foo/bar/z.txt | |
92 | M foo/y.txt |
|
92 | M foo/y.txt | |
93 | $ hg diff --nodates -S |
|
93 | $ hg diff --nodates -S | |
94 | diff -r d254738c5f5e foo/y.txt |
|
94 | diff -r d254738c5f5e foo/y.txt | |
95 | --- a/foo/y.txt |
|
95 | --- a/foo/y.txt | |
96 | +++ b/foo/y.txt |
|
96 | +++ b/foo/y.txt | |
97 | @@ -1,2 +1,3 @@ |
|
97 | @@ -1,2 +1,3 @@ | |
98 | y1 |
|
98 | y1 | |
99 | y2 |
|
99 | y2 | |
100 | +y3 |
|
100 | +y3 | |
101 | diff -r 9647f22de499 foo/bar/z.txt |
|
101 | diff -r 9647f22de499 foo/bar/z.txt | |
102 | --- a/foo/bar/z.txt |
|
102 | --- a/foo/bar/z.txt | |
103 | +++ b/foo/bar/z.txt |
|
103 | +++ b/foo/bar/z.txt | |
104 | @@ -1,2 +1,3 @@ |
|
104 | @@ -1,2 +1,3 @@ | |
105 | z1 |
|
105 | z1 | |
106 | z2 |
|
106 | z2 | |
107 | +z3 |
|
107 | +z3 | |
108 |
|
108 | |||
109 | Status call crossing repository boundaries: |
|
109 | Status call crossing repository boundaries: | |
110 |
|
110 | |||
111 | $ hg status -S foo/bar/z.txt |
|
111 | $ hg status -S foo/bar/z.txt | |
112 | M foo/bar/z.txt |
|
112 | M foo/bar/z.txt | |
113 | $ hg status -S -I 'foo/?.txt' |
|
113 | $ hg status -S -I 'foo/?.txt' | |
114 | M foo/y.txt |
|
114 | M foo/y.txt | |
115 | $ hg status -S -I '**/?.txt' |
|
115 | $ hg status -S -I '**/?.txt' | |
116 | M foo/bar/z.txt |
|
116 | M foo/bar/z.txt | |
117 | M foo/y.txt |
|
117 | M foo/y.txt | |
118 | $ hg diff --nodates -S -I '**/?.txt' |
|
118 | $ hg diff --nodates -S -I '**/?.txt' | |
119 | diff -r d254738c5f5e foo/y.txt |
|
119 | diff -r d254738c5f5e foo/y.txt | |
120 | --- a/foo/y.txt |
|
120 | --- a/foo/y.txt | |
121 | +++ b/foo/y.txt |
|
121 | +++ b/foo/y.txt | |
122 | @@ -1,2 +1,3 @@ |
|
122 | @@ -1,2 +1,3 @@ | |
123 | y1 |
|
123 | y1 | |
124 | y2 |
|
124 | y2 | |
125 | +y3 |
|
125 | +y3 | |
126 | diff -r 9647f22de499 foo/bar/z.txt |
|
126 | diff -r 9647f22de499 foo/bar/z.txt | |
127 | --- a/foo/bar/z.txt |
|
127 | --- a/foo/bar/z.txt | |
128 | +++ b/foo/bar/z.txt |
|
128 | +++ b/foo/bar/z.txt | |
129 | @@ -1,2 +1,3 @@ |
|
129 | @@ -1,2 +1,3 @@ | |
130 | z1 |
|
130 | z1 | |
131 | z2 |
|
131 | z2 | |
132 | +z3 |
|
132 | +z3 | |
133 |
|
133 | |||
134 | Status from within a subdirectory: |
|
134 | Status from within a subdirectory: | |
135 |
|
135 | |||
136 | $ mkdir dir |
|
136 | $ mkdir dir | |
137 | $ cd dir |
|
137 | $ cd dir | |
138 | $ echo a1 > a.txt |
|
138 | $ echo a1 > a.txt | |
139 | $ hg status -S |
|
139 | $ hg status -S | |
140 | M foo/bar/z.txt |
|
140 | M foo/bar/z.txt | |
141 | M foo/y.txt |
|
141 | M foo/y.txt | |
142 | ? dir/a.txt |
|
142 | ? dir/a.txt | |
143 | $ hg diff --nodates -S |
|
143 | $ hg diff --nodates -S | |
144 | diff -r d254738c5f5e foo/y.txt |
|
144 | diff -r d254738c5f5e foo/y.txt | |
145 | --- a/foo/y.txt |
|
145 | --- a/foo/y.txt | |
146 | +++ b/foo/y.txt |
|
146 | +++ b/foo/y.txt | |
147 | @@ -1,2 +1,3 @@ |
|
147 | @@ -1,2 +1,3 @@ | |
148 | y1 |
|
148 | y1 | |
149 | y2 |
|
149 | y2 | |
150 | +y3 |
|
150 | +y3 | |
151 | diff -r 9647f22de499 foo/bar/z.txt |
|
151 | diff -r 9647f22de499 foo/bar/z.txt | |
152 | --- a/foo/bar/z.txt |
|
152 | --- a/foo/bar/z.txt | |
153 | +++ b/foo/bar/z.txt |
|
153 | +++ b/foo/bar/z.txt | |
154 | @@ -1,2 +1,3 @@ |
|
154 | @@ -1,2 +1,3 @@ | |
155 | z1 |
|
155 | z1 | |
156 | z2 |
|
156 | z2 | |
157 | +z3 |
|
157 | +z3 | |
158 |
|
158 | |||
159 | Status with relative path: |
|
159 | Status with relative path: | |
160 |
|
160 | |||
161 | $ hg status -S .. |
|
161 | $ hg status -S .. | |
162 | M ../foo/bar/z.txt |
|
162 | M ../foo/bar/z.txt | |
163 | M ../foo/y.txt |
|
163 | M ../foo/y.txt | |
164 | ? a.txt |
|
164 | ? a.txt | |
165 |
|
165 | |||
166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as |
|
166 | XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as | |
167 | added instead of modified. |
|
167 | added instead of modified. | |
168 | $ hg status -S .. --config extensions.largefiles= |
|
168 | $ hg status -S .. --config extensions.largefiles= | |
169 | M ../foo/bar/z.txt |
|
169 | M ../foo/bar/z.txt | |
170 | M ../foo/y.txt |
|
170 | M ../foo/y.txt | |
171 | ? a.txt |
|
171 | ? a.txt | |
172 |
|
172 | |||
173 | $ hg diff --nodates -S .. |
|
173 | $ hg diff --nodates -S .. | |
174 | diff -r d254738c5f5e foo/y.txt |
|
174 | diff -r d254738c5f5e foo/y.txt | |
175 | --- a/foo/y.txt |
|
175 | --- a/foo/y.txt | |
176 | +++ b/foo/y.txt |
|
176 | +++ b/foo/y.txt | |
177 | @@ -1,2 +1,3 @@ |
|
177 | @@ -1,2 +1,3 @@ | |
178 | y1 |
|
178 | y1 | |
179 | y2 |
|
179 | y2 | |
180 | +y3 |
|
180 | +y3 | |
181 | diff -r 9647f22de499 foo/bar/z.txt |
|
181 | diff -r 9647f22de499 foo/bar/z.txt | |
182 | --- a/foo/bar/z.txt |
|
182 | --- a/foo/bar/z.txt | |
183 | +++ b/foo/bar/z.txt |
|
183 | +++ b/foo/bar/z.txt | |
184 | @@ -1,2 +1,3 @@ |
|
184 | @@ -1,2 +1,3 @@ | |
185 | z1 |
|
185 | z1 | |
186 | z2 |
|
186 | z2 | |
187 | +z3 |
|
187 | +z3 | |
188 | $ cd .. |
|
188 | $ cd .. | |
189 |
|
189 | |||
190 | Cleanup and final commit: |
|
190 | Cleanup and final commit: | |
191 |
|
191 | |||
192 | $ rm -r dir |
|
192 | $ rm -r dir | |
193 | $ hg commit --subrepos -m 2-3-2 |
|
193 | $ hg commit --subrepos -m 2-3-2 | |
194 | committing subrepository foo |
|
194 | committing subrepository foo | |
195 | committing subrepository foo/bar |
|
195 | committing subrepository foo/bar | |
196 |
|
196 | |||
197 | Test explicit path commands within subrepos: add/forget |
|
197 | Test explicit path commands within subrepos: add/forget | |
198 | $ echo z1 > foo/bar/z2.txt |
|
198 | $ echo z1 > foo/bar/z2.txt | |
199 | $ hg status -S |
|
199 | $ hg status -S | |
200 | ? foo/bar/z2.txt |
|
200 | ? foo/bar/z2.txt | |
201 | $ hg add foo/bar/z2.txt |
|
201 | $ hg add foo/bar/z2.txt | |
202 | $ hg status -S |
|
202 | $ hg status -S | |
203 | A foo/bar/z2.txt |
|
203 | A foo/bar/z2.txt | |
204 | $ hg forget foo/bar/z2.txt |
|
204 | $ hg forget foo/bar/z2.txt | |
205 | $ hg status -S |
|
205 | $ hg status -S | |
206 | ? foo/bar/z2.txt |
|
206 | ? foo/bar/z2.txt | |
207 | $ hg forget foo/bar/z2.txt |
|
207 | $ hg forget foo/bar/z2.txt | |
208 | not removing foo/bar/z2.txt: file is already untracked |
|
208 | not removing foo/bar/z2.txt: file is already untracked | |
209 | [1] |
|
209 | [1] | |
210 | $ hg status -S |
|
210 | $ hg status -S | |
211 | ? foo/bar/z2.txt |
|
211 | ? foo/bar/z2.txt | |
212 | $ rm foo/bar/z2.txt |
|
212 | $ rm foo/bar/z2.txt | |
213 |
|
213 | |||
214 | Log with the relationships between repo and its subrepo: |
|
214 | Log with the relationships between repo and its subrepo: | |
215 |
|
215 | |||
216 | $ hg log --template '{rev}:{node|short} {desc}\n' |
|
216 | $ hg log --template '{rev}:{node|short} {desc}\n' | |
217 | 2:1326fa26d0c0 2-3-2 |
|
217 | 2:1326fa26d0c0 2-3-2 | |
218 | 1:4b3c9ff4f66b 1-2-1 |
|
218 | 1:4b3c9ff4f66b 1-2-1 | |
219 | 0:23376cbba0d8 0-0-0 |
|
219 | 0:23376cbba0d8 0-0-0 | |
220 |
|
220 | |||
221 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' |
|
221 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' | |
222 | 3:65903cebad86 2-3-2 |
|
222 | 3:65903cebad86 2-3-2 | |
223 | 2:d254738c5f5e 0-2-1 |
|
223 | 2:d254738c5f5e 0-2-1 | |
224 | 1:8629ce7dcc39 0-1-0 |
|
224 | 1:8629ce7dcc39 0-1-0 | |
225 | 0:af048e97ade2 0-0-0 |
|
225 | 0:af048e97ade2 0-0-0 | |
226 |
|
226 | |||
227 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' |
|
227 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' | |
228 | 2:31ecbdafd357 2-3-2 |
|
228 | 2:31ecbdafd357 2-3-2 | |
229 | 1:9647f22de499 0-1-1 |
|
229 | 1:9647f22de499 0-1-1 | |
230 | 0:4904098473f9 0-0-0 |
|
230 | 0:4904098473f9 0-0-0 | |
231 |
|
231 | |||
232 | Status between revisions: |
|
232 | Status between revisions: | |
233 |
|
233 | |||
234 | $ hg status -S |
|
234 | $ hg status -S | |
235 | $ hg status -S --rev 0:1 |
|
235 | $ hg status -S --rev 0:1 | |
236 | M .hgsubstate |
|
236 | M .hgsubstate | |
237 | M foo/.hgsubstate |
|
237 | M foo/.hgsubstate | |
238 | M foo/bar/z.txt |
|
238 | M foo/bar/z.txt | |
239 | M foo/y.txt |
|
239 | M foo/y.txt | |
240 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 |
|
240 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 | |
241 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt |
|
241 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt | |
242 | --- a/foo/y.txt |
|
242 | --- a/foo/y.txt | |
243 | +++ b/foo/y.txt |
|
243 | +++ b/foo/y.txt | |
244 | @@ -1,1 +1,2 @@ |
|
244 | @@ -1,1 +1,2 @@ | |
245 | y1 |
|
245 | y1 | |
246 | +y2 |
|
246 | +y2 | |
247 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt |
|
247 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt | |
248 | --- a/foo/bar/z.txt |
|
248 | --- a/foo/bar/z.txt | |
249 | +++ b/foo/bar/z.txt |
|
249 | +++ b/foo/bar/z.txt | |
250 | @@ -1,1 +1,2 @@ |
|
250 | @@ -1,1 +1,2 @@ | |
251 | z1 |
|
251 | z1 | |
252 | +z2 |
|
252 | +z2 | |
253 |
|
253 | |||
254 | #if serve |
|
254 | #if serve | |
255 | $ cd .. |
|
255 | $ cd .. | |
256 | $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log |
|
256 | $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log | |
257 | adding = $TESTTMP/repo |
|
257 | adding = $TESTTMP/repo | |
258 | adding foo = $TESTTMP/repo/foo |
|
258 | adding foo = $TESTTMP/repo/foo | |
259 | adding foo/bar = $TESTTMP/repo/foo/bar |
|
259 | adding foo/bar = $TESTTMP/repo/foo/bar | |
260 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) |
|
260 | listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?) | |
261 | adding = $TESTTMP/repo (?) |
|
261 | adding = $TESTTMP/repo (?) | |
262 | adding foo = $TESTTMP/repo/foo (?) |
|
262 | adding foo = $TESTTMP/repo/foo (?) | |
263 | adding foo/bar = $TESTTMP/repo/foo/bar (?) |
|
263 | adding foo/bar = $TESTTMP/repo/foo/bar (?) | |
264 | $ cat hg1.pid >> $DAEMON_PIDS |
|
264 | $ cat hg1.pid >> $DAEMON_PIDS | |
265 |
|
265 | |||
266 | $ hg clone http://localhost:$HGPORT clone --config progress.disable=True |
|
266 | $ hg clone http://localhost:$HGPORT clone --config progress.disable=True | |
267 | requesting all changes |
|
267 | requesting all changes | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 3 changesets with 5 changes to 3 files |
|
271 | added 3 changesets with 5 changes to 3 files | |
272 | new changesets 23376cbba0d8:1326fa26d0c0 |
|
272 | new changesets 23376cbba0d8:1326fa26d0c0 | |
273 | updating to branch default |
|
273 | updating to branch default | |
274 | cloning subrepo foo from http://localhost:$HGPORT/foo |
|
274 | cloning subrepo foo from http://localhost:$HGPORT/foo | |
275 | requesting all changes |
|
275 | requesting all changes | |
276 | adding changesets |
|
276 | adding changesets | |
277 | adding manifests |
|
277 | adding manifests | |
278 | adding file changes |
|
278 | adding file changes | |
279 | added 4 changesets with 7 changes to 3 files |
|
279 | added 4 changesets with 7 changes to 3 files | |
280 | new changesets af048e97ade2:65903cebad86 |
|
280 | new changesets af048e97ade2:65903cebad86 | |
281 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar |
|
281 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar | |
282 | requesting all changes |
|
282 | requesting all changes | |
283 | adding changesets |
|
283 | adding changesets | |
284 | adding manifests |
|
284 | adding manifests | |
285 | adding file changes |
|
285 | adding file changes | |
286 | added 3 changesets with 3 changes to 1 files |
|
286 | added 3 changesets with 3 changes to 1 files | |
287 | new changesets 4904098473f9:31ecbdafd357 |
|
287 | new changesets 4904098473f9:31ecbdafd357 | |
288 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
288 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
289 |
|
289 | |||
290 | $ cat clone/foo/bar/z.txt |
|
290 | $ cat clone/foo/bar/z.txt | |
291 | z1 |
|
291 | z1 | |
292 | z2 |
|
292 | z2 | |
293 | z3 |
|
293 | z3 | |
294 |
|
294 | |||
|
295 | BUG: The remote subrepo should be cloned to the local pool, and then shared | |||
|
296 | from there. | |||
|
297 | ||||
|
298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |||
|
299 | > clone http://localhost:$HGPORT shared | |||
|
300 | (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf) | |||
|
301 | requesting all changes | |||
|
302 | adding changesets | |||
|
303 | adding manifests | |||
|
304 | adding file changes | |||
|
305 | added 3 changesets with 5 changes to 3 files | |||
|
306 | new changesets 23376cbba0d8:1326fa26d0c0 | |||
|
307 | searching for changes | |||
|
308 | no changes found | |||
|
309 | updating working directory | |||
|
310 | sharing subrepo foo from http://localhost:$HGPORT/foo | |||
|
311 | abort: can only share local repositories (in subrepository "foo") | |||
|
312 | [255] | |||
|
313 | ||||
295 | $ cat access.log |
|
314 | $ cat access.log | |
296 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
315 | * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |
297 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) |
|
316 | * "GET /?cmd=batch HTTP/1.1" 200 - * (glob) | |
298 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
317 | * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
299 | * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
318 | * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |
300 | * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob) |
|
319 | * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob) | |
301 | * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
320 | * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
302 | * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
321 | * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
303 | * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob) |
|
322 | * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob) | |
304 | * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob) |
|
323 | * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob) | |
|
324 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |||
|
325 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |||
|
326 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) | |||
|
327 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |||
|
328 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |||
|
329 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |||
|
330 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |||
|
331 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |||
305 |
|
332 | |||
306 | $ killdaemons.py |
|
333 | $ killdaemons.py | |
307 | $ rm hg1.pid error.log access.log |
|
334 | $ rm hg1.pid error.log access.log | |
308 | $ cd repo |
|
335 | $ cd repo | |
309 | #endif |
|
336 | #endif | |
310 |
|
337 | |||
311 | Enable progress extension for archive tests: |
|
338 | Enable progress extension for archive tests: | |
312 |
|
339 | |||
313 | $ cp $HGRCPATH $HGRCPATH.no-progress |
|
340 | $ cp $HGRCPATH $HGRCPATH.no-progress | |
314 | $ cat >> $HGRCPATH <<EOF |
|
341 | $ cat >> $HGRCPATH <<EOF | |
315 | > [progress] |
|
342 | > [progress] | |
316 | > disable=False |
|
343 | > disable=False | |
317 | > assume-tty = 1 |
|
344 | > assume-tty = 1 | |
318 | > delay = 0 |
|
345 | > delay = 0 | |
319 | > # set changedelay really large so we don't see nested topics |
|
346 | > # set changedelay really large so we don't see nested topics | |
320 | > changedelay = 30000 |
|
347 | > changedelay = 30000 | |
321 | > format = topic bar number |
|
348 | > format = topic bar number | |
322 | > refresh = 0 |
|
349 | > refresh = 0 | |
323 | > width = 60 |
|
350 | > width = 60 | |
324 | > EOF |
|
351 | > EOF | |
325 |
|
352 | |||
326 | Test archiving to a directory tree (the doubled lines in the output |
|
353 | Test archiving to a directory tree (the doubled lines in the output | |
327 | only show up in the test output, not in real usage): |
|
354 | only show up in the test output, not in real usage): | |
328 |
|
355 | |||
329 | $ hg archive --subrepos ../archive |
|
356 | $ hg archive --subrepos ../archive | |
330 | \r (no-eol) (esc) |
|
357 | \r (no-eol) (esc) | |
331 | archiving [ ] 0/3\r (no-eol) (esc) |
|
358 | archiving [ ] 0/3\r (no-eol) (esc) | |
332 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
359 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
333 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
360 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
334 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
361 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
335 | \r (no-eol) (esc) |
|
362 | \r (no-eol) (esc) | |
336 | \r (no-eol) (esc) |
|
363 | \r (no-eol) (esc) | |
337 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
364 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
338 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
365 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
339 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
366 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
340 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
367 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
341 | \r (no-eol) (esc) |
|
368 | \r (no-eol) (esc) | |
342 | \r (no-eol) (esc) |
|
369 | \r (no-eol) (esc) | |
343 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
370 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
344 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
371 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
345 | \r (no-eol) (esc) |
|
372 | \r (no-eol) (esc) | |
346 | $ find ../archive | sort |
|
373 | $ find ../archive | sort | |
347 | ../archive |
|
374 | ../archive | |
348 | ../archive/.hg_archival.txt |
|
375 | ../archive/.hg_archival.txt | |
349 | ../archive/.hgsub |
|
376 | ../archive/.hgsub | |
350 | ../archive/.hgsubstate |
|
377 | ../archive/.hgsubstate | |
351 | ../archive/foo |
|
378 | ../archive/foo | |
352 | ../archive/foo/.hgsub |
|
379 | ../archive/foo/.hgsub | |
353 | ../archive/foo/.hgsubstate |
|
380 | ../archive/foo/.hgsubstate | |
354 | ../archive/foo/bar |
|
381 | ../archive/foo/bar | |
355 | ../archive/foo/bar/z.txt |
|
382 | ../archive/foo/bar/z.txt | |
356 | ../archive/foo/y.txt |
|
383 | ../archive/foo/y.txt | |
357 | ../archive/x.txt |
|
384 | ../archive/x.txt | |
358 |
|
385 | |||
359 | Test archiving to zip file (unzip output is unstable): |
|
386 | Test archiving to zip file (unzip output is unstable): | |
360 |
|
387 | |||
361 | $ hg archive --subrepos --prefix '.' ../archive.zip |
|
388 | $ hg archive --subrepos --prefix '.' ../archive.zip | |
362 | \r (no-eol) (esc) |
|
389 | \r (no-eol) (esc) | |
363 | archiving [ ] 0/3\r (no-eol) (esc) |
|
390 | archiving [ ] 0/3\r (no-eol) (esc) | |
364 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
391 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
365 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
392 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
366 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
393 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
367 | \r (no-eol) (esc) |
|
394 | \r (no-eol) (esc) | |
368 | \r (no-eol) (esc) |
|
395 | \r (no-eol) (esc) | |
369 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
396 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
370 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
397 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
371 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
398 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
372 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
399 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
373 | \r (no-eol) (esc) |
|
400 | \r (no-eol) (esc) | |
374 | \r (no-eol) (esc) |
|
401 | \r (no-eol) (esc) | |
375 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
402 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
376 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
403 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
377 | \r (no-eol) (esc) |
|
404 | \r (no-eol) (esc) | |
378 |
|
405 | |||
379 | (unzip date formating is unstable, we do not care about it and glob it out) |
|
406 | (unzip date formating is unstable, we do not care about it and glob it out) | |
380 |
|
407 | |||
381 | $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$ |
|
408 | $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$ | |
382 | Archive: ../archive.zip |
|
409 | Archive: ../archive.zip | |
383 | Length [ ]* Date [ ]* Time [ ]* Name (re) |
|
410 | Length [ ]* Date [ ]* Time [ ]* Name (re) | |
384 | 172 [0-9:\- ]* .hg_archival.txt (re) |
|
411 | 172 [0-9:\- ]* .hg_archival.txt (re) | |
385 | 10 [0-9:\- ]* .hgsub (re) |
|
412 | 10 [0-9:\- ]* .hgsub (re) | |
386 | 45 [0-9:\- ]* .hgsubstate (re) |
|
413 | 45 [0-9:\- ]* .hgsubstate (re) | |
387 | 3 [0-9:\- ]* x.txt (re) |
|
414 | 3 [0-9:\- ]* x.txt (re) | |
388 | 10 [0-9:\- ]* foo/.hgsub (re) |
|
415 | 10 [0-9:\- ]* foo/.hgsub (re) | |
389 | 45 [0-9:\- ]* foo/.hgsubstate (re) |
|
416 | 45 [0-9:\- ]* foo/.hgsubstate (re) | |
390 | 9 [0-9:\- ]* foo/y.txt (re) |
|
417 | 9 [0-9:\- ]* foo/y.txt (re) | |
391 | 9 [0-9:\- ]* foo/bar/z.txt (re) |
|
418 | 9 [0-9:\- ]* foo/bar/z.txt (re) | |
392 |
|
419 | |||
393 | Test archiving a revision that references a subrepo that is not yet |
|
420 | Test archiving a revision that references a subrepo that is not yet | |
394 | cloned: |
|
421 | cloned: | |
395 |
|
422 | |||
396 | #if hardlink |
|
423 | #if hardlink | |
397 | $ hg clone -U . ../empty |
|
424 | $ hg clone -U . ../empty | |
398 | \r (no-eol) (esc) |
|
425 | \r (no-eol) (esc) | |
399 | linking [ <=> ] 1\r (no-eol) (esc) |
|
426 | linking [ <=> ] 1\r (no-eol) (esc) | |
400 | linking [ <=> ] 2\r (no-eol) (esc) |
|
427 | linking [ <=> ] 2\r (no-eol) (esc) | |
401 | linking [ <=> ] 3\r (no-eol) (esc) |
|
428 | linking [ <=> ] 3\r (no-eol) (esc) | |
402 | linking [ <=> ] 4\r (no-eol) (esc) |
|
429 | linking [ <=> ] 4\r (no-eol) (esc) | |
403 | linking [ <=> ] 5\r (no-eol) (esc) |
|
430 | linking [ <=> ] 5\r (no-eol) (esc) | |
404 | linking [ <=> ] 6\r (no-eol) (esc) |
|
431 | linking [ <=> ] 6\r (no-eol) (esc) | |
405 | linking [ <=> ] 7\r (no-eol) (esc) |
|
432 | linking [ <=> ] 7\r (no-eol) (esc) | |
406 | linking [ <=> ] 8\r (no-eol) (esc) |
|
433 | linking [ <=> ] 8\r (no-eol) (esc) | |
407 | \r (no-eol) (esc) |
|
434 | \r (no-eol) (esc) | |
408 | #else |
|
435 | #else | |
409 | $ hg clone -U . ../empty |
|
436 | $ hg clone -U . ../empty | |
410 | \r (no-eol) (esc) |
|
437 | \r (no-eol) (esc) | |
411 | linking [ <=> ] 1 (no-eol) |
|
438 | linking [ <=> ] 1 (no-eol) | |
412 | #endif |
|
439 | #endif | |
413 |
|
440 | |||
414 | $ cd ../empty |
|
441 | $ cd ../empty | |
415 | #if hardlink |
|
442 | #if hardlink | |
416 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
443 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz | |
417 | \r (no-eol) (esc) |
|
444 | \r (no-eol) (esc) | |
418 | archiving [ ] 0/3\r (no-eol) (esc) |
|
445 | archiving [ ] 0/3\r (no-eol) (esc) | |
419 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
446 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
420 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
447 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
421 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
448 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
422 | \r (no-eol) (esc) |
|
449 | \r (no-eol) (esc) | |
423 | \r (no-eol) (esc) |
|
450 | \r (no-eol) (esc) | |
424 | linking [ <=> ] 1\r (no-eol) (esc) |
|
451 | linking [ <=> ] 1\r (no-eol) (esc) | |
425 | linking [ <=> ] 2\r (no-eol) (esc) |
|
452 | linking [ <=> ] 2\r (no-eol) (esc) | |
426 | linking [ <=> ] 3\r (no-eol) (esc) |
|
453 | linking [ <=> ] 3\r (no-eol) (esc) | |
427 | linking [ <=> ] 4\r (no-eol) (esc) |
|
454 | linking [ <=> ] 4\r (no-eol) (esc) | |
428 | linking [ <=> ] 5\r (no-eol) (esc) |
|
455 | linking [ <=> ] 5\r (no-eol) (esc) | |
429 | linking [ <=> ] 6\r (no-eol) (esc) |
|
456 | linking [ <=> ] 6\r (no-eol) (esc) | |
430 | linking [ <=> ] 7\r (no-eol) (esc) |
|
457 | linking [ <=> ] 7\r (no-eol) (esc) | |
431 | linking [ <=> ] 8\r (no-eol) (esc) |
|
458 | linking [ <=> ] 8\r (no-eol) (esc) | |
432 | \r (no-eol) (esc) |
|
459 | \r (no-eol) (esc) | |
433 | \r (no-eol) (esc) |
|
460 | \r (no-eol) (esc) | |
434 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
461 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
435 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
462 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
436 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
463 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
437 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
464 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
438 | \r (no-eol) (esc) |
|
465 | \r (no-eol) (esc) | |
439 | \r (no-eol) (esc) |
|
466 | \r (no-eol) (esc) | |
440 | linking [ <=> ] 1\r (no-eol) (esc) |
|
467 | linking [ <=> ] 1\r (no-eol) (esc) | |
441 | linking [ <=> ] 2\r (no-eol) (esc) |
|
468 | linking [ <=> ] 2\r (no-eol) (esc) | |
442 | linking [ <=> ] 3\r (no-eol) (esc) |
|
469 | linking [ <=> ] 3\r (no-eol) (esc) | |
443 | linking [ <=> ] 4\r (no-eol) (esc) |
|
470 | linking [ <=> ] 4\r (no-eol) (esc) | |
444 | linking [ <=> ] 5\r (no-eol) (esc) |
|
471 | linking [ <=> ] 5\r (no-eol) (esc) | |
445 | linking [ <=> ] 6\r (no-eol) (esc) |
|
472 | linking [ <=> ] 6\r (no-eol) (esc) | |
446 | \r (no-eol) (esc) |
|
473 | \r (no-eol) (esc) | |
447 | \r (no-eol) (esc) |
|
474 | \r (no-eol) (esc) | |
448 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
475 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) | |
449 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
476 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) | |
450 | \r (no-eol) (esc) |
|
477 | \r (no-eol) (esc) | |
451 | cloning subrepo foo from $TESTTMP/repo/foo |
|
478 | cloning subrepo foo from $TESTTMP/repo/foo | |
452 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
479 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
453 | #else |
|
480 | #else | |
454 | Note there's a slight output glitch on non-hardlink systems: the last |
|
481 | Note there's a slight output glitch on non-hardlink systems: the last | |
455 | "linking" progress topic never gets closed, leading to slight output corruption on that platform. |
|
482 | "linking" progress topic never gets closed, leading to slight output corruption on that platform. | |
456 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz |
|
483 | $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz | |
457 | \r (no-eol) (esc) |
|
484 | \r (no-eol) (esc) | |
458 | archiving [ ] 0/3\r (no-eol) (esc) |
|
485 | archiving [ ] 0/3\r (no-eol) (esc) | |
459 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
486 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
460 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
487 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
461 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
488 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
462 | \r (no-eol) (esc) |
|
489 | \r (no-eol) (esc) | |
463 | \r (no-eol) (esc) |
|
490 | \r (no-eol) (esc) | |
464 | linking [ <=> ] 1\r (no-eol) (esc) |
|
491 | linking [ <=> ] 1\r (no-eol) (esc) | |
465 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
492 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
466 | #endif |
|
493 | #endif | |
467 |
|
494 | |||
468 | Archive + subrepos uses '/' for all component separators |
|
495 | Archive + subrepos uses '/' for all component separators | |
469 |
|
496 | |||
470 | $ tar -tzf ../archive.tar.gz | sort |
|
497 | $ tar -tzf ../archive.tar.gz | sort | |
471 | .hg_archival.txt |
|
498 | .hg_archival.txt | |
472 | .hgsub |
|
499 | .hgsub | |
473 | .hgsubstate |
|
500 | .hgsubstate | |
474 | foo/.hgsub |
|
501 | foo/.hgsub | |
475 | foo/.hgsubstate |
|
502 | foo/.hgsubstate | |
476 | foo/bar/z.txt |
|
503 | foo/bar/z.txt | |
477 | foo/y.txt |
|
504 | foo/y.txt | |
478 | x.txt |
|
505 | x.txt | |
479 |
|
506 | |||
480 | The newly cloned subrepos contain no working copy: |
|
507 | The newly cloned subrepos contain no working copy: | |
481 |
|
508 | |||
482 | $ hg -R foo summary |
|
509 | $ hg -R foo summary | |
483 | parent: -1:000000000000 (no revision checked out) |
|
510 | parent: -1:000000000000 (no revision checked out) | |
484 | branch: default |
|
511 | branch: default | |
485 | commit: (clean) |
|
512 | commit: (clean) | |
486 | update: 4 new changesets (update) |
|
513 | update: 4 new changesets (update) | |
487 |
|
514 | |||
|
515 | Sharing a local repo without the locally referenced subrepo (i.e. it was never | |||
|
516 | updated from null), fails the same as a clone operation. | |||
|
517 | ||||
|
518 | $ hg --config progress.disable=True clone -U ../empty ../empty2 | |||
|
519 | ||||
|
520 | $ hg --config extensions.share= --config progress.disable=True \ | |||
|
521 | > share ../empty2 ../empty_share | |||
|
522 | updating working directory | |||
|
523 | abort: repository $TESTTMP/empty2/foo not found! | |||
|
524 | [255] | |||
|
525 | ||||
|
526 | $ hg --config progress.disable=True clone ../empty2 ../empty_clone | |||
|
527 | updating to branch default | |||
|
528 | abort: repository $TESTTMP/empty2/foo not found! | |||
|
529 | [255] | |||
|
530 | ||||
488 | Disable progress extension and cleanup: |
|
531 | Disable progress extension and cleanup: | |
489 |
|
532 | |||
490 | $ mv $HGRCPATH.no-progress $HGRCPATH |
|
533 | $ mv $HGRCPATH.no-progress $HGRCPATH | |
491 |
|
534 | |||
492 | Test archiving when there is a directory in the way for a subrepo |
|
535 | Test archiving when there is a directory in the way for a subrepo | |
493 | created by archive: |
|
536 | created by archive: | |
494 |
|
537 | |||
495 | $ hg clone -U . ../almost-empty |
|
538 | $ hg clone -U . ../almost-empty | |
496 | $ cd ../almost-empty |
|
539 | $ cd ../almost-empty | |
497 | $ mkdir foo |
|
540 | $ mkdir foo | |
498 | $ echo f > foo/f |
|
541 | $ echo f > foo/f | |
499 | $ hg archive --subrepos -r tip archive |
|
542 | $ hg archive --subrepos -r tip archive | |
500 | cloning subrepo foo from $TESTTMP/empty/foo |
|
543 | cloning subrepo foo from $TESTTMP/empty/foo | |
501 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") |
|
544 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo") | |
502 | [255] |
|
545 | [255] | |
503 |
|
546 | |||
504 | Clone and test outgoing: |
|
547 | Clone and test outgoing: | |
505 |
|
548 | |||
506 | $ cd .. |
|
549 | $ cd .. | |
507 | $ hg clone repo repo2 |
|
550 | $ hg clone repo repo2 | |
508 | updating to branch default |
|
551 | updating to branch default | |
509 | cloning subrepo foo from $TESTTMP/repo/foo |
|
552 | cloning subrepo foo from $TESTTMP/repo/foo | |
510 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
553 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar | |
511 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
554 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
512 | $ cd repo2 |
|
555 | $ cd repo2 | |
513 | $ hg outgoing -S |
|
556 | $ hg outgoing -S | |
514 | comparing with $TESTTMP/repo |
|
557 | comparing with $TESTTMP/repo | |
515 | searching for changes |
|
558 | searching for changes | |
516 | no changes found |
|
559 | no changes found | |
517 | comparing with $TESTTMP/repo/foo |
|
560 | comparing with $TESTTMP/repo/foo | |
518 | searching for changes |
|
561 | searching for changes | |
519 | no changes found |
|
562 | no changes found | |
520 | comparing with $TESTTMP/repo/foo/bar |
|
563 | comparing with $TESTTMP/repo/foo/bar | |
521 | searching for changes |
|
564 | searching for changes | |
522 | no changes found |
|
565 | no changes found | |
523 | [1] |
|
566 | [1] | |
524 |
|
567 | |||
525 | Make nested change: |
|
568 | Make nested change: | |
526 |
|
569 | |||
527 | $ echo y4 >> foo/y.txt |
|
570 | $ echo y4 >> foo/y.txt | |
528 | $ hg diff --nodates -S |
|
571 | $ hg diff --nodates -S | |
529 | diff -r 65903cebad86 foo/y.txt |
|
572 | diff -r 65903cebad86 foo/y.txt | |
530 | --- a/foo/y.txt |
|
573 | --- a/foo/y.txt | |
531 | +++ b/foo/y.txt |
|
574 | +++ b/foo/y.txt | |
532 | @@ -1,3 +1,4 @@ |
|
575 | @@ -1,3 +1,4 @@ | |
533 | y1 |
|
576 | y1 | |
534 | y2 |
|
577 | y2 | |
535 | y3 |
|
578 | y3 | |
536 | +y4 |
|
579 | +y4 | |
537 | $ hg commit --subrepos -m 3-4-2 |
|
580 | $ hg commit --subrepos -m 3-4-2 | |
538 | committing subrepository foo |
|
581 | committing subrepository foo | |
539 | $ hg outgoing -S |
|
582 | $ hg outgoing -S | |
540 | comparing with $TESTTMP/repo |
|
583 | comparing with $TESTTMP/repo | |
541 | searching for changes |
|
584 | searching for changes | |
542 | changeset: 3:2655b8ecc4ee |
|
585 | changeset: 3:2655b8ecc4ee | |
543 | tag: tip |
|
586 | tag: tip | |
544 | user: test |
|
587 | user: test | |
545 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
588 | date: Thu Jan 01 00:00:00 1970 +0000 | |
546 | summary: 3-4-2 |
|
589 | summary: 3-4-2 | |
547 |
|
590 | |||
548 | comparing with $TESTTMP/repo/foo |
|
591 | comparing with $TESTTMP/repo/foo | |
549 | searching for changes |
|
592 | searching for changes | |
550 | changeset: 4:e96193d6cb36 |
|
593 | changeset: 4:e96193d6cb36 | |
551 | tag: tip |
|
594 | tag: tip | |
552 | user: test |
|
595 | user: test | |
553 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
596 | date: Thu Jan 01 00:00:00 1970 +0000 | |
554 | summary: 3-4-2 |
|
597 | summary: 3-4-2 | |
555 |
|
598 | |||
556 | comparing with $TESTTMP/repo/foo/bar |
|
599 | comparing with $TESTTMP/repo/foo/bar | |
557 | searching for changes |
|
600 | searching for changes | |
558 | no changes found |
|
601 | no changes found | |
559 |
|
602 | |||
560 |
|
603 | |||
561 | Switch to original repo and setup default path: |
|
604 | Switch to original repo and setup default path: | |
562 |
|
605 | |||
563 | $ cd ../repo |
|
606 | $ cd ../repo | |
564 | $ echo '[paths]' >> .hg/hgrc |
|
607 | $ echo '[paths]' >> .hg/hgrc | |
565 | $ echo 'default = ../repo2' >> .hg/hgrc |
|
608 | $ echo 'default = ../repo2' >> .hg/hgrc | |
566 |
|
609 | |||
567 | Test incoming: |
|
610 | Test incoming: | |
568 |
|
611 | |||
569 | $ hg incoming -S |
|
612 | $ hg incoming -S | |
570 | comparing with $TESTTMP/repo2 |
|
613 | comparing with $TESTTMP/repo2 | |
571 | searching for changes |
|
614 | searching for changes | |
572 | changeset: 3:2655b8ecc4ee |
|
615 | changeset: 3:2655b8ecc4ee | |
573 | tag: tip |
|
616 | tag: tip | |
574 | user: test |
|
617 | user: test | |
575 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
618 | date: Thu Jan 01 00:00:00 1970 +0000 | |
576 | summary: 3-4-2 |
|
619 | summary: 3-4-2 | |
577 |
|
620 | |||
578 | comparing with $TESTTMP/repo2/foo |
|
621 | comparing with $TESTTMP/repo2/foo | |
579 | searching for changes |
|
622 | searching for changes | |
580 | changeset: 4:e96193d6cb36 |
|
623 | changeset: 4:e96193d6cb36 | |
581 | tag: tip |
|
624 | tag: tip | |
582 | user: test |
|
625 | user: test | |
583 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
626 | date: Thu Jan 01 00:00:00 1970 +0000 | |
584 | summary: 3-4-2 |
|
627 | summary: 3-4-2 | |
585 |
|
628 | |||
586 | comparing with $TESTTMP/repo2/foo/bar |
|
629 | comparing with $TESTTMP/repo2/foo/bar | |
587 | searching for changes |
|
630 | searching for changes | |
588 | no changes found |
|
631 | no changes found | |
589 |
|
632 | |||
590 | $ hg incoming -S --bundle incoming.hg |
|
633 | $ hg incoming -S --bundle incoming.hg | |
591 | abort: cannot combine --bundle and --subrepos |
|
634 | abort: cannot combine --bundle and --subrepos | |
592 | [255] |
|
635 | [255] | |
593 |
|
636 | |||
594 | Test missing subrepo: |
|
637 | Test missing subrepo: | |
595 |
|
638 | |||
596 | $ rm -r foo |
|
639 | $ rm -r foo | |
597 | $ hg status -S |
|
640 | $ hg status -S | |
598 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
641 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" | |
599 |
|
642 | |||
600 | Issue2619: IndexError: list index out of range on hg add with subrepos |
|
643 | Issue2619: IndexError: list index out of range on hg add with subrepos | |
601 | The subrepo must sorts after the explicit filename. |
|
644 | The subrepo must sorts after the explicit filename. | |
602 |
|
645 | |||
603 | $ cd .. |
|
646 | $ cd .. | |
604 | $ hg init test |
|
647 | $ hg init test | |
605 | $ cd test |
|
648 | $ cd test | |
606 | $ hg init x |
|
649 | $ hg init x | |
607 | $ echo abc > abc.txt |
|
650 | $ echo abc > abc.txt | |
608 | $ hg ci -Am "abc" |
|
651 | $ hg ci -Am "abc" | |
609 | adding abc.txt |
|
652 | adding abc.txt | |
610 | $ echo "x = x" >> .hgsub |
|
653 | $ echo "x = x" >> .hgsub | |
611 | $ hg add .hgsub |
|
654 | $ hg add .hgsub | |
612 | $ touch a x/a |
|
655 | $ touch a x/a | |
613 | $ hg add a x/a |
|
656 | $ hg add a x/a | |
614 |
|
657 | |||
615 | $ hg ci -Sm "added x" |
|
658 | $ hg ci -Sm "added x" | |
616 | committing subrepository x |
|
659 | committing subrepository x | |
617 | $ echo abc > x/a |
|
660 | $ echo abc > x/a | |
618 | $ hg revert --rev '.^' "set:subrepo('glob:x*')" |
|
661 | $ hg revert --rev '.^' "set:subrepo('glob:x*')" | |
619 | abort: subrepository 'x' does not exist in 25ac2c9b3180! |
|
662 | abort: subrepository 'x' does not exist in 25ac2c9b3180! | |
620 | [255] |
|
663 | [255] | |
621 |
|
664 | |||
622 | $ cd .. |
|
665 | $ cd .. |
@@ -1,109 +1,162 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | Preparing the subrepository 'sub' |
|
3 | Preparing the subrepository 'sub' | |
4 |
|
4 | |||
5 | $ hg init sub |
|
5 | $ hg init sub | |
6 | $ echo sub > sub/sub |
|
6 | $ echo sub > sub/sub | |
7 | $ hg add -R sub |
|
7 | $ hg add -R sub | |
8 | adding sub/sub |
|
8 | adding sub/sub | |
9 | $ hg commit -R sub -m "sub import" |
|
9 | $ hg commit -R sub -m "sub import" | |
10 |
|
10 | |||
11 | Preparing the 'main' repo which depends on the subrepo 'sub' |
|
11 | Preparing the 'main' repo which depends on the subrepo 'sub' | |
12 |
|
12 | |||
13 | $ hg init main |
|
13 | $ hg init main | |
14 | $ echo main > main/main |
|
14 | $ echo main > main/main | |
15 | $ echo "sub = ../sub" > main/.hgsub |
|
15 | $ echo "sub = ../sub" > main/.hgsub | |
16 | $ hg clone sub main/sub |
|
16 | $ hg clone sub main/sub | |
17 | updating to branch default |
|
17 | updating to branch default | |
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 | $ hg add -R main |
|
19 | $ hg add -R main | |
20 | adding main/.hgsub |
|
20 | adding main/.hgsub | |
21 | adding main/main |
|
21 | adding main/main | |
22 | $ hg commit -R main -m "main import" |
|
22 | $ hg commit -R main -m "main import" | |
23 |
|
23 | |||
24 | Cleaning both repositories, just as a clone -U |
|
24 | Cleaning both repositories, just as a clone -U | |
25 |
|
25 | |||
26 | $ hg up -C -R sub null |
|
26 | $ hg up -C -R sub null | |
27 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
27 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
28 | $ hg up -C -R main null |
|
28 | $ hg up -C -R main null | |
29 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
29 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
30 | $ rm -rf main/sub |
|
30 | $ rm -rf main/sub | |
31 |
|
31 | |||
32 | hide outer repo |
|
32 | hide outer repo | |
33 | $ hg init |
|
33 | $ hg init | |
34 |
|
34 | |||
35 | Serving them both using hgweb |
|
35 | Serving them both using hgweb | |
36 |
|
36 | |||
37 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf |
|
37 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf | |
38 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ |
|
38 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ | |
39 | > -A /dev/null -E /dev/null --pid-file hg.pid -d |
|
39 | > -A /dev/null -E /dev/null --pid-file hg.pid -d | |
40 | $ cat hg.pid >> $DAEMON_PIDS |
|
40 | $ cat hg.pid >> $DAEMON_PIDS | |
41 |
|
41 | |||
42 | Clone main from hgweb |
|
42 | Clone main from hgweb | |
43 |
|
43 | |||
44 | $ hg clone "http://localhost:$HGPORT/main" cloned |
|
44 | $ hg clone "http://localhost:$HGPORT/main" cloned | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | adding changesets |
|
46 | adding changesets | |
47 | adding manifests |
|
47 | adding manifests | |
48 | adding file changes |
|
48 | adding file changes | |
49 | added 1 changesets with 3 changes to 3 files |
|
49 | added 1 changesets with 3 changes to 3 files | |
50 | new changesets fdfeeb3e979e |
|
50 | new changesets fdfeeb3e979e | |
51 | updating to branch default |
|
51 | updating to branch default | |
52 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
52 | cloning subrepo sub from http://localhost:$HGPORT/sub | |
53 | requesting all changes |
|
53 | requesting all changes | |
54 | adding changesets |
|
54 | adding changesets | |
55 | adding manifests |
|
55 | adding manifests | |
56 | adding file changes |
|
56 | adding file changes | |
57 | added 1 changesets with 1 changes to 1 files |
|
57 | added 1 changesets with 1 changes to 1 files | |
58 | new changesets 863c1745b441 |
|
58 | new changesets 863c1745b441 | |
59 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 |
|
60 | |||
61 | Checking cloned repo ids |
|
61 | Checking cloned repo ids | |
62 |
|
62 | |||
63 | $ hg id -R cloned |
|
63 | $ hg id -R cloned | |
64 | fdfeeb3e979e tip |
|
64 | fdfeeb3e979e tip | |
65 | $ hg id -R cloned/sub |
|
65 | $ hg id -R cloned/sub | |
66 | 863c1745b441 tip |
|
66 | 863c1745b441 tip | |
67 |
|
67 | |||
68 | subrepo debug for 'main' clone |
|
68 | subrepo debug for 'main' clone | |
69 |
|
69 | |||
70 | $ hg debugsub -R cloned |
|
70 | $ hg debugsub -R cloned | |
71 | path sub |
|
71 | path sub | |
72 | source ../sub |
|
72 | source ../sub | |
73 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 |
|
73 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 | |
74 |
|
74 | |||
|
75 | Test sharing with a remote URL reference | |||
|
76 | ||||
|
77 | $ hg init absolute_subrepo | |||
|
78 | $ cd absolute_subrepo | |||
|
79 | $ echo foo > foo.txt | |||
|
80 | $ hg ci -Am 'initial commit' | |||
|
81 | adding foo.txt | |||
|
82 | $ echo "sub = http://localhost:$HGPORT/sub" > .hgsub | |||
|
83 | $ hg ci -Am 'add absolute subrepo' | |||
|
84 | adding .hgsub | |||
|
85 | $ cd .. | |||
|
86 | ||||
|
87 | BUG: Remote subrepos cannot be shared, and pooled repos don't have their | |||
|
88 | relative subrepos in the relative location stated in .hgsub. | |||
|
89 | ||||
|
90 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |||
|
91 | > clone absolute_subrepo cloned_from_abs | |||
|
92 | (sharing from new pooled repository 8d6a2f1e993b34b6557de0042cfe825ae12a8dae) | |||
|
93 | requesting all changes | |||
|
94 | adding changesets | |||
|
95 | adding manifests | |||
|
96 | adding file changes | |||
|
97 | added 2 changesets with 3 changes to 3 files | |||
|
98 | new changesets 8d6a2f1e993b:c6d0e6ebd1c9 | |||
|
99 | searching for changes | |||
|
100 | no changes found | |||
|
101 | updating working directory | |||
|
102 | sharing subrepo sub from http://localhost:$HGPORT/sub | |||
|
103 | abort: can only share local repositories (in subrepository "sub") | |||
|
104 | [255] | |||
|
105 | ||||
|
106 | $ hg --config extensions.share= share absolute_subrepo shared_from_abs | |||
|
107 | updating working directory | |||
|
108 | sharing subrepo sub from http://localhost:$HGPORT/sub | |||
|
109 | abort: can only share local repositories (in subrepository "sub") | |||
|
110 | [255] | |||
|
111 | ||||
|
112 | $ hg --config extensions.share= share -U absolute_subrepo shared_from_abs2 | |||
|
113 | $ hg -R shared_from_abs2 update -r tip | |||
|
114 | sharing subrepo sub from http://localhost:$HGPORT/sub | |||
|
115 | abort: can only share local repositories (in subrepository "sub") | |||
|
116 | [255] | |||
|
117 | ||||
|
118 | BUG: A repo without its subrepo available locally should be sharable if the | |||
|
119 | subrepo is referenced by absolute path. | |||
|
120 | ||||
|
121 | $ hg clone -U absolute_subrepo cloned_null_from_abs | |||
|
122 | $ hg --config extensions.share= share cloned_null_from_abs shared_from_null_abs | |||
|
123 | updating working directory | |||
|
124 | sharing subrepo sub from http://localhost:$HGPORT/sub | |||
|
125 | abort: can only share local repositories (in subrepository "sub") | |||
|
126 | [255] | |||
|
127 | ||||
75 | $ killdaemons.py |
|
128 | $ killdaemons.py | |
76 |
|
129 | |||
77 | subrepo paths with ssh urls |
|
130 | subrepo paths with ssh urls | |
78 |
|
131 | |||
79 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone |
|
132 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone | |
80 | requesting all changes |
|
133 | requesting all changes | |
81 | adding changesets |
|
134 | adding changesets | |
82 | adding manifests |
|
135 | adding manifests | |
83 | adding file changes |
|
136 | adding file changes | |
84 | added 1 changesets with 3 changes to 3 files |
|
137 | added 1 changesets with 3 changes to 3 files | |
85 | new changesets fdfeeb3e979e |
|
138 | new changesets fdfeeb3e979e | |
86 | updating to branch default |
|
139 | updating to branch default | |
87 | cloning subrepo sub from ssh://user@dummy/sub |
|
140 | cloning subrepo sub from ssh://user@dummy/sub | |
88 | requesting all changes |
|
141 | requesting all changes | |
89 | adding changesets |
|
142 | adding changesets | |
90 | adding manifests |
|
143 | adding manifests | |
91 | adding file changes |
|
144 | adding file changes | |
92 | added 1 changesets with 1 changes to 1 files |
|
145 | added 1 changesets with 1 changes to 1 files | |
93 | new changesets 863c1745b441 |
|
146 | new changesets 863c1745b441 | |
94 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
147 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 |
|
148 | |||
96 | $ hg -R sshclone push -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/cloned |
|
149 | $ hg -R sshclone push -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/cloned | |
97 | pushing to ssh://user@dummy/$TESTTMP/cloned |
|
150 | pushing to ssh://user@dummy/$TESTTMP/cloned | |
98 | pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub |
|
151 | pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub | |
99 | searching for changes |
|
152 | searching for changes | |
100 | no changes found |
|
153 | no changes found | |
101 | searching for changes |
|
154 | searching for changes | |
102 | no changes found |
|
155 | no changes found | |
103 | [1] |
|
156 | [1] | |
104 |
|
157 | |||
105 | $ cat dummylog |
|
158 | $ cat dummylog | |
106 | Got arguments 1:user@dummy 2:hg -R cloned serve --stdio |
|
159 | Got arguments 1:user@dummy 2:hg -R cloned serve --stdio | |
107 | Got arguments 1:user@dummy 2:hg -R sub serve --stdio |
|
160 | Got arguments 1:user@dummy 2:hg -R sub serve --stdio | |
108 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio |
|
161 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio | |
109 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio |
|
162 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio |
General Comments 0
You need to be logged in to leave comments.
Login now