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