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