##// END OF EJS Templates
test-discovery-legacy: disable bundle2 for legacy test...
Pierre-Yves David -
r25117:b5c8ee72 default
parent child Browse files
Show More
@@ -1,369 +1,369 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 Tests discovery against servers without getbundle support:
3 Tests discovery against servers without getbundle support:
4
4
5 $ cat >> $HGRCPATH <<EOF
5 $ cat >> $HGRCPATH <<EOF
6 > [ui]
6 > [ui]
7 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
7 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
8 > EOF
8 > EOF
9 $ cp $HGRCPATH $HGRCPATH-withcap
9 $ cp $HGRCPATH $HGRCPATH-withcap
10
10
11 $ CAP="getbundle known changegroupsubset"
11 $ CAP="getbundle known changegroupsubset bundle2"
12 $ . "$TESTDIR/notcapable"
12 $ . "$TESTDIR/notcapable"
13 $ cp $HGRCPATH $HGRCPATH-nocap
13 $ cp $HGRCPATH $HGRCPATH-nocap
14 $ cp $HGRCPATH-withcap $HGRCPATH
14 $ cp $HGRCPATH-withcap $HGRCPATH
15
15
16 Prep for test server without branchmap support
16 Prep for test server without branchmap support
17
17
18 $ CAP="branchmap"
18 $ CAP="branchmap"
19 $ . "$TESTDIR/notcapable"
19 $ . "$TESTDIR/notcapable"
20 $ cp $HGRCPATH $HGRCPATH-nocap-branchmap
20 $ cp $HGRCPATH $HGRCPATH-nocap-branchmap
21 $ cp $HGRCPATH-withcap $HGRCPATH
21 $ cp $HGRCPATH-withcap $HGRCPATH
22
22
23 Setup HTTP server control:
23 Setup HTTP server control:
24
24
25 $ remote=http://localhost:$HGPORT/
25 $ remote=http://localhost:$HGPORT/
26 $ export remote
26 $ export remote
27 $ tstart() {
27 $ tstart() {
28 > echo '[web]' > $1/.hg/hgrc
28 > echo '[web]' > $1/.hg/hgrc
29 > echo 'push_ssl = false' >> $1/.hg/hgrc
29 > echo 'push_ssl = false' >> $1/.hg/hgrc
30 > echo 'allow_push = *' >> $1/.hg/hgrc
30 > echo 'allow_push = *' >> $1/.hg/hgrc
31 > cp $HGRCPATH-nocap $HGRCPATH
31 > cp $HGRCPATH-nocap $HGRCPATH
32 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
32 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
33 > cat hg.pid >> $DAEMON_PIDS
33 > cat hg.pid >> $DAEMON_PIDS
34 > }
34 > }
35 $ tstop() {
35 $ tstop() {
36 > "$TESTDIR/killdaemons.py" $DAEMON_PIDS
36 > "$TESTDIR/killdaemons.py" $DAEMON_PIDS
37 > cp $HGRCPATH-withcap $HGRCPATH
37 > cp $HGRCPATH-withcap $HGRCPATH
38 > }
38 > }
39
39
40 Both are empty:
40 Both are empty:
41
41
42 $ hg init empty1
42 $ hg init empty1
43 $ hg init empty2
43 $ hg init empty2
44 $ tstart empty2
44 $ tstart empty2
45 $ hg incoming -R empty1 $remote
45 $ hg incoming -R empty1 $remote
46 comparing with http://localhost:$HGPORT/
46 comparing with http://localhost:$HGPORT/
47 no changes found
47 no changes found
48 [1]
48 [1]
49 $ hg outgoing -R empty1 $remote
49 $ hg outgoing -R empty1 $remote
50 comparing with http://localhost:$HGPORT/
50 comparing with http://localhost:$HGPORT/
51 no changes found
51 no changes found
52 [1]
52 [1]
53 $ hg pull -R empty1 $remote
53 $ hg pull -R empty1 $remote
54 pulling from http://localhost:$HGPORT/
54 pulling from http://localhost:$HGPORT/
55 no changes found
55 no changes found
56 $ hg push -R empty1 $remote
56 $ hg push -R empty1 $remote
57 pushing to http://localhost:$HGPORT/
57 pushing to http://localhost:$HGPORT/
58 no changes found
58 no changes found
59 [1]
59 [1]
60 $ tstop
60 $ tstop
61
61
62 Base repo:
62 Base repo:
63
63
64 $ hg init main
64 $ hg init main
65 $ cd main
65 $ cd main
66 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
66 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
67 $ hg log -G
67 $ hg log -G
68 o 11 a19bfa7e7328: r11 both
68 o 11 a19bfa7e7328: r11 both
69 |
69 |
70 o 10 8b6bad1512e1: r10 both
70 o 10 8b6bad1512e1: r10 both
71 |
71 |
72 o 9 025829e08038: r9 both
72 o 9 025829e08038: r9 both
73 |\
73 |\
74 | o 8 d8f638ac69e9: r8 name2
74 | o 8 d8f638ac69e9: r8 name2
75 | |
75 | |
76 | o 7 b6b4d315a2ac: r7 name2
76 | o 7 b6b4d315a2ac: r7 name2
77 | |
77 | |
78 | o 6 6c6f5d5f3c11: r6 name2
78 | o 6 6c6f5d5f3c11: r6 name2
79 | |
79 | |
80 | o 5 70314b29987d: r5 name2
80 | o 5 70314b29987d: r5 name2
81 | |
81 | |
82 o | 4 e71dbbc70e03: r4 name1
82 o | 4 e71dbbc70e03: r4 name1
83 | |
83 | |
84 o | 3 2c8d5d5ec612: r3 name1
84 o | 3 2c8d5d5ec612: r3 name1
85 | |
85 | |
86 o | 2 a7892891da29: r2 name1
86 o | 2 a7892891da29: r2 name1
87 |/
87 |/
88 o 1 0019a3b924fd: r1
88 o 1 0019a3b924fd: r1
89 |
89 |
90 o 0 d57206cc072a: r0
90 o 0 d57206cc072a: r0
91
91
92 $ cd ..
92 $ cd ..
93 $ tstart main
93 $ tstart main
94
94
95 Full clone:
95 Full clone:
96
96
97 $ hg clone main full
97 $ hg clone main full
98 updating to branch default
98 updating to branch default
99 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ cd full
100 $ cd full
101 $ hg incoming $remote
101 $ hg incoming $remote
102 comparing with http://localhost:$HGPORT/
102 comparing with http://localhost:$HGPORT/
103 searching for changes
103 searching for changes
104 no changes found
104 no changes found
105 [1]
105 [1]
106 $ hg outgoing $remote
106 $ hg outgoing $remote
107 comparing with http://localhost:$HGPORT/
107 comparing with http://localhost:$HGPORT/
108 searching for changes
108 searching for changes
109 no changes found
109 no changes found
110 [1]
110 [1]
111 $ hg pull $remote
111 $ hg pull $remote
112 pulling from http://localhost:$HGPORT/
112 pulling from http://localhost:$HGPORT/
113 searching for changes
113 searching for changes
114 no changes found
114 no changes found
115 $ hg push $remote
115 $ hg push $remote
116 pushing to http://localhost:$HGPORT/
116 pushing to http://localhost:$HGPORT/
117 searching for changes
117 searching for changes
118 no changes found
118 no changes found
119 [1]
119 [1]
120 $ cd ..
120 $ cd ..
121
121
122 Local is empty:
122 Local is empty:
123
123
124 $ cd empty1
124 $ cd empty1
125 $ hg incoming $remote --rev name1
125 $ hg incoming $remote --rev name1
126 comparing with http://localhost:$HGPORT/
126 comparing with http://localhost:$HGPORT/
127 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
127 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
128 [255]
128 [255]
129 $ hg incoming $remote
129 $ hg incoming $remote
130 comparing with http://localhost:$HGPORT/
130 comparing with http://localhost:$HGPORT/
131 0 d57206cc072a: r0
131 0 d57206cc072a: r0
132 1 0019a3b924fd: r1
132 1 0019a3b924fd: r1
133 2 a7892891da29: r2 name1
133 2 a7892891da29: r2 name1
134 3 2c8d5d5ec612: r3 name1
134 3 2c8d5d5ec612: r3 name1
135 4 e71dbbc70e03: r4 name1
135 4 e71dbbc70e03: r4 name1
136 5 70314b29987d: r5 name2
136 5 70314b29987d: r5 name2
137 6 6c6f5d5f3c11: r6 name2
137 6 6c6f5d5f3c11: r6 name2
138 7 b6b4d315a2ac: r7 name2
138 7 b6b4d315a2ac: r7 name2
139 8 d8f638ac69e9: r8 name2
139 8 d8f638ac69e9: r8 name2
140 9 025829e08038: r9 both
140 9 025829e08038: r9 both
141 10 8b6bad1512e1: r10 both
141 10 8b6bad1512e1: r10 both
142 11 a19bfa7e7328: r11 both
142 11 a19bfa7e7328: r11 both
143 $ hg outgoing $remote
143 $ hg outgoing $remote
144 comparing with http://localhost:$HGPORT/
144 comparing with http://localhost:$HGPORT/
145 no changes found
145 no changes found
146 [1]
146 [1]
147 $ hg push $remote
147 $ hg push $remote
148 pushing to http://localhost:$HGPORT/
148 pushing to http://localhost:$HGPORT/
149 no changes found
149 no changes found
150 [1]
150 [1]
151 $ hg pull $remote
151 $ hg pull $remote
152 pulling from http://localhost:$HGPORT/
152 pulling from http://localhost:$HGPORT/
153 requesting all changes
153 requesting all changes
154 adding changesets
154 adding changesets
155 adding manifests
155 adding manifests
156 adding file changes
156 adding file changes
157 added 12 changesets with 24 changes to 2 files
157 added 12 changesets with 24 changes to 2 files
158 (run 'hg update' to get a working copy)
158 (run 'hg update' to get a working copy)
159 $ hg incoming $remote
159 $ hg incoming $remote
160 comparing with http://localhost:$HGPORT/
160 comparing with http://localhost:$HGPORT/
161 searching for changes
161 searching for changes
162 no changes found
162 no changes found
163 [1]
163 [1]
164 $ cd ..
164 $ cd ..
165
165
166 Local is subset:
166 Local is subset:
167
167
168 $ cp $HGRCPATH-withcap $HGRCPATH
168 $ cp $HGRCPATH-withcap $HGRCPATH
169 $ hg clone main subset --rev name2 ; cd subset
169 $ hg clone main subset --rev name2 ; cd subset
170 adding changesets
170 adding changesets
171 adding manifests
171 adding manifests
172 adding file changes
172 adding file changes
173 added 6 changesets with 12 changes to 2 files
173 added 6 changesets with 12 changes to 2 files
174 updating to branch name2
174 updating to branch name2
175 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 $ cp $HGRCPATH-nocap $HGRCPATH
176 $ cp $HGRCPATH-nocap $HGRCPATH
177 $ hg incoming $remote
177 $ hg incoming $remote
178 comparing with http://localhost:$HGPORT/
178 comparing with http://localhost:$HGPORT/
179 searching for changes
179 searching for changes
180 6 a7892891da29: r2 name1
180 6 a7892891da29: r2 name1
181 7 2c8d5d5ec612: r3 name1
181 7 2c8d5d5ec612: r3 name1
182 8 e71dbbc70e03: r4 name1
182 8 e71dbbc70e03: r4 name1
183 9 025829e08038: r9 both
183 9 025829e08038: r9 both
184 10 8b6bad1512e1: r10 both
184 10 8b6bad1512e1: r10 both
185 11 a19bfa7e7328: r11 both
185 11 a19bfa7e7328: r11 both
186 $ hg outgoing $remote
186 $ hg outgoing $remote
187 comparing with http://localhost:$HGPORT/
187 comparing with http://localhost:$HGPORT/
188 searching for changes
188 searching for changes
189 no changes found
189 no changes found
190 [1]
190 [1]
191 $ hg push $remote
191 $ hg push $remote
192 pushing to http://localhost:$HGPORT/
192 pushing to http://localhost:$HGPORT/
193 searching for changes
193 searching for changes
194 no changes found
194 no changes found
195 [1]
195 [1]
196 $ hg pull $remote
196 $ hg pull $remote
197 pulling from http://localhost:$HGPORT/
197 pulling from http://localhost:$HGPORT/
198 searching for changes
198 searching for changes
199 adding changesets
199 adding changesets
200 adding manifests
200 adding manifests
201 adding file changes
201 adding file changes
202 added 6 changesets with 12 changes to 2 files
202 added 6 changesets with 12 changes to 2 files
203 (run 'hg update' to get a working copy)
203 (run 'hg update' to get a working copy)
204 $ hg incoming $remote
204 $ hg incoming $remote
205 comparing with http://localhost:$HGPORT/
205 comparing with http://localhost:$HGPORT/
206 searching for changes
206 searching for changes
207 no changes found
207 no changes found
208 [1]
208 [1]
209 $ cd ..
209 $ cd ..
210
210
211 Remote is empty:
211 Remote is empty:
212
212
213 $ tstop ; tstart empty2
213 $ tstop ; tstart empty2
214 $ cd main
214 $ cd main
215 $ hg incoming $remote
215 $ hg incoming $remote
216 comparing with http://localhost:$HGPORT/
216 comparing with http://localhost:$HGPORT/
217 searching for changes
217 searching for changes
218 no changes found
218 no changes found
219 [1]
219 [1]
220 $ hg outgoing $remote
220 $ hg outgoing $remote
221 comparing with http://localhost:$HGPORT/
221 comparing with http://localhost:$HGPORT/
222 searching for changes
222 searching for changes
223 0 d57206cc072a: r0
223 0 d57206cc072a: r0
224 1 0019a3b924fd: r1
224 1 0019a3b924fd: r1
225 2 a7892891da29: r2 name1
225 2 a7892891da29: r2 name1
226 3 2c8d5d5ec612: r3 name1
226 3 2c8d5d5ec612: r3 name1
227 4 e71dbbc70e03: r4 name1
227 4 e71dbbc70e03: r4 name1
228 5 70314b29987d: r5 name2
228 5 70314b29987d: r5 name2
229 6 6c6f5d5f3c11: r6 name2
229 6 6c6f5d5f3c11: r6 name2
230 7 b6b4d315a2ac: r7 name2
230 7 b6b4d315a2ac: r7 name2
231 8 d8f638ac69e9: r8 name2
231 8 d8f638ac69e9: r8 name2
232 9 025829e08038: r9 both
232 9 025829e08038: r9 both
233 10 8b6bad1512e1: r10 both
233 10 8b6bad1512e1: r10 both
234 11 a19bfa7e7328: r11 both
234 11 a19bfa7e7328: r11 both
235 $ hg pull $remote
235 $ hg pull $remote
236 pulling from http://localhost:$HGPORT/
236 pulling from http://localhost:$HGPORT/
237 searching for changes
237 searching for changes
238 no changes found
238 no changes found
239 $ hg push $remote
239 $ hg push $remote
240 pushing to http://localhost:$HGPORT/
240 pushing to http://localhost:$HGPORT/
241 searching for changes
241 searching for changes
242 remote: adding changesets
242 remote: adding changesets
243 remote: adding manifests
243 remote: adding manifests
244 remote: adding file changes
244 remote: adding file changes
245 remote: added 12 changesets with 24 changes to 2 files
245 remote: added 12 changesets with 24 changes to 2 files
246 $ hg outgoing $remote
246 $ hg outgoing $remote
247 comparing with http://localhost:$HGPORT/
247 comparing with http://localhost:$HGPORT/
248 searching for changes
248 searching for changes
249 no changes found
249 no changes found
250 [1]
250 [1]
251 $ cd ..
251 $ cd ..
252
252
253 Local is superset:
253 Local is superset:
254
254
255 $ tstop
255 $ tstop
256 $ hg clone main subset2 --rev name2
256 $ hg clone main subset2 --rev name2
257 adding changesets
257 adding changesets
258 adding manifests
258 adding manifests
259 adding file changes
259 adding file changes
260 added 6 changesets with 12 changes to 2 files
260 added 6 changesets with 12 changes to 2 files
261 updating to branch name2
261 updating to branch name2
262 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 $ tstart subset2
263 $ tstart subset2
264 $ cd main
264 $ cd main
265 $ hg incoming $remote
265 $ hg incoming $remote
266 comparing with http://localhost:$HGPORT/
266 comparing with http://localhost:$HGPORT/
267 searching for changes
267 searching for changes
268 no changes found
268 no changes found
269 [1]
269 [1]
270 $ hg outgoing $remote
270 $ hg outgoing $remote
271 comparing with http://localhost:$HGPORT/
271 comparing with http://localhost:$HGPORT/
272 searching for changes
272 searching for changes
273 2 a7892891da29: r2 name1
273 2 a7892891da29: r2 name1
274 3 2c8d5d5ec612: r3 name1
274 3 2c8d5d5ec612: r3 name1
275 4 e71dbbc70e03: r4 name1
275 4 e71dbbc70e03: r4 name1
276 9 025829e08038: r9 both
276 9 025829e08038: r9 both
277 10 8b6bad1512e1: r10 both
277 10 8b6bad1512e1: r10 both
278 11 a19bfa7e7328: r11 both
278 11 a19bfa7e7328: r11 both
279 $ hg pull $remote
279 $ hg pull $remote
280 pulling from http://localhost:$HGPORT/
280 pulling from http://localhost:$HGPORT/
281 searching for changes
281 searching for changes
282 no changes found
282 no changes found
283 $ hg push $remote
283 $ hg push $remote
284 pushing to http://localhost:$HGPORT/
284 pushing to http://localhost:$HGPORT/
285 searching for changes
285 searching for changes
286 abort: push creates new remote branches: both, name1!
286 abort: push creates new remote branches: both, name1!
287 (use 'hg push --new-branch' to create new remote branches)
287 (use 'hg push --new-branch' to create new remote branches)
288 [255]
288 [255]
289 $ hg push $remote --new-branch
289 $ hg push $remote --new-branch
290 pushing to http://localhost:$HGPORT/
290 pushing to http://localhost:$HGPORT/
291 searching for changes
291 searching for changes
292 remote: adding changesets
292 remote: adding changesets
293 remote: adding manifests
293 remote: adding manifests
294 remote: adding file changes
294 remote: adding file changes
295 remote: added 6 changesets with 12 changes to 2 files
295 remote: added 6 changesets with 12 changes to 2 files
296 $ hg outgoing $remote
296 $ hg outgoing $remote
297 comparing with http://localhost:$HGPORT/
297 comparing with http://localhost:$HGPORT/
298 searching for changes
298 searching for changes
299 no changes found
299 no changes found
300 [1]
300 [1]
301 $ cd ..
301 $ cd ..
302
302
303 Partial pull:
303 Partial pull:
304
304
305 $ tstop ; tstart main
305 $ tstop ; tstart main
306 $ hg clone $remote partial --rev name2
306 $ hg clone $remote partial --rev name2
307 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
307 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
308 [255]
308 [255]
309 $ hg init partial; cd partial
309 $ hg init partial; cd partial
310 $ hg incoming $remote --rev name2
310 $ hg incoming $remote --rev name2
311 comparing with http://localhost:$HGPORT/
311 comparing with http://localhost:$HGPORT/
312 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
312 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
313 [255]
313 [255]
314 $ hg pull $remote --rev name2
314 $ hg pull $remote --rev name2
315 pulling from http://localhost:$HGPORT/
315 pulling from http://localhost:$HGPORT/
316 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
316 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
317 [255]
317 [255]
318 $ cd ..
318 $ cd ..
319
319
320 $ tstop
320 $ tstop
321
321
322 Exercise pushing to server without branchmap capability
322 Exercise pushing to server without branchmap capability
323
323
324 $ cp $HGRCPATH-nocap-branchmap $HGRCPATH-nocap
324 $ cp $HGRCPATH-nocap-branchmap $HGRCPATH-nocap
325 $ hg init rlocal
325 $ hg init rlocal
326 $ cd rlocal
326 $ cd rlocal
327 $ echo A > A
327 $ echo A > A
328 $ hg ci -Am A
328 $ hg ci -Am A
329 adding A
329 adding A
330 $ cd ..
330 $ cd ..
331 $ hg clone rlocal rremote
331 $ hg clone rlocal rremote
332 updating to branch default
332 updating to branch default
333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
334 $ cd rlocal
334 $ cd rlocal
335 $ echo B > B
335 $ echo B > B
336 $ hg ci -Am B
336 $ hg ci -Am B
337 adding B
337 adding B
338 $ cd ..
338 $ cd ..
339 $ tstart rremote
339 $ tstart rremote
340
340
341 $ cd rlocal
341 $ cd rlocal
342 $ hg incoming $remote
342 $ hg incoming $remote
343 comparing with http://localhost:$HGPORT/
343 comparing with http://localhost:$HGPORT/
344 searching for changes
344 searching for changes
345 no changes found
345 no changes found
346 [1]
346 [1]
347 $ hg outgoing $remote
347 $ hg outgoing $remote
348 comparing with http://localhost:$HGPORT/
348 comparing with http://localhost:$HGPORT/
349 searching for changes
349 searching for changes
350 1 27547f69f254: B
350 1 27547f69f254: B
351 $ hg pull $remote
351 $ hg pull $remote
352 pulling from http://localhost:$HGPORT/
352 pulling from http://localhost:$HGPORT/
353 searching for changes
353 searching for changes
354 no changes found
354 no changes found
355 $ hg push $remote
355 $ hg push $remote
356 pushing to http://localhost:$HGPORT/
356 pushing to http://localhost:$HGPORT/
357 searching for changes
357 searching for changes
358 remote: adding changesets
358 remote: adding changesets
359 remote: adding manifests
359 remote: adding manifests
360 remote: adding file changes
360 remote: adding file changes
361 remote: added 1 changesets with 1 changes to 1 files
361 remote: added 1 changesets with 1 changes to 1 files
362 $ hg outgoing $remote
362 $ hg outgoing $remote
363 comparing with http://localhost:$HGPORT/
363 comparing with http://localhost:$HGPORT/
364 searching for changes
364 searching for changes
365 no changes found
365 no changes found
366 [1]
366 [1]
367 $ cd ..
367 $ cd ..
368
368
369 $ tstop
369 $ tstop
General Comments 0
You need to be logged in to leave comments. Login now