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