##// END OF EJS Templates
tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich -
r22181:851db07b stable
parent child Browse files
Show More
@@ -1,327 +1,353
1 1
2 2 Function to test discovery between two repos in both directions, using both the local shortcut
3 3 (which is currently not activated by default) and the full remotable protocol:
4 4
5 5 $ testdesc() { # revs_a, revs_b, dagdesc
6 6 > if [ -d foo ]; then rm -rf foo; fi
7 7 > hg init foo
8 8 > cd foo
9 9 > hg debugbuilddag "$3"
10 10 > hg clone . a $1 --quiet
11 11 > hg clone . b $2 --quiet
12 12 > echo
13 13 > echo "% -- a -> b tree"
14 14 > hg -R a debugdiscovery b --verbose --old
15 15 > echo
16 16 > echo "% -- a -> b set"
17 17 > hg -R a debugdiscovery b --verbose --debug
18 18 > echo
19 19 > echo "% -- b -> a tree"
20 20 > hg -R b debugdiscovery a --verbose --old
21 21 > echo
22 22 > echo "% -- b -> a set"
23 23 > hg -R b debugdiscovery a --verbose --debug
24 24 > cd ..
25 25 > }
26 26
27 27
28 28 Small superset:
29 29
30 30 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
31 31 > +2:f +1:a1:b1
32 32 > <f +4 :a2
33 33 > +5 :b2
34 34 > <f +3 :b3'
35 35
36 36 % -- a -> b tree
37 37 comparing with b
38 38 searching for changes
39 39 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
40 40 common heads: 01241442b3c2 b5714e113bc0
41 41 local is subset
42 42
43 43 % -- a -> b set
44 44 comparing with b
45 45 query 1; heads
46 46 searching for changes
47 47 all local heads known remotely
48 48 common heads: 01241442b3c2 b5714e113bc0
49 49 local is subset
50 50
51 51 % -- b -> a tree
52 52 comparing with a
53 53 searching for changes
54 54 unpruned common: 01241442b3c2 b5714e113bc0
55 55 common heads: 01241442b3c2 b5714e113bc0
56 56 remote is subset
57 57
58 58 % -- b -> a set
59 59 comparing with a
60 60 query 1; heads
61 61 searching for changes
62 62 all remote heads known locally
63 63 common heads: 01241442b3c2 b5714e113bc0
64 64 remote is subset
65 65
66 66
67 67 Many new:
68 68
69 69 $ testdesc '-ra1 -ra2' '-rb' '
70 70 > +2:f +3:a1 +3:b
71 71 > <f +30 :a2'
72 72
73 73 % -- a -> b tree
74 74 comparing with b
75 75 searching for changes
76 76 unpruned common: bebd167eb94d
77 77 common heads: bebd167eb94d
78 78
79 79 % -- a -> b set
80 80 comparing with b
81 81 query 1; heads
82 82 searching for changes
83 83 taking initial sample
84 84 searching: 2 queries
85 85 query 2; still undecided: 29, sample size is: 29
86 86 2 total queries
87 87 common heads: bebd167eb94d
88 88
89 89 % -- b -> a tree
90 90 comparing with a
91 91 searching for changes
92 92 unpruned common: 66f7d451a68b bebd167eb94d
93 93 common heads: bebd167eb94d
94 94
95 95 % -- b -> a set
96 96 comparing with a
97 97 query 1; heads
98 98 searching for changes
99 99 taking initial sample
100 100 searching: 2 queries
101 101 query 2; still undecided: 2, sample size is: 2
102 102 2 total queries
103 103 common heads: bebd167eb94d
104 104
105 105
106 106 Both sides many new with stub:
107 107
108 108 $ testdesc '-ra1 -ra2' '-rb' '
109 109 > +2:f +2:a1 +30 :b
110 110 > <f +30 :a2'
111 111
112 112 % -- a -> b tree
113 113 comparing with b
114 114 searching for changes
115 115 unpruned common: 2dc09a01254d
116 116 common heads: 2dc09a01254d
117 117
118 118 % -- a -> b set
119 119 comparing with b
120 120 query 1; heads
121 121 searching for changes
122 122 taking initial sample
123 123 searching: 2 queries
124 124 query 2; still undecided: 29, sample size is: 29
125 125 2 total queries
126 126 common heads: 2dc09a01254d
127 127
128 128 % -- b -> a tree
129 129 comparing with a
130 130 searching for changes
131 131 unpruned common: 2dc09a01254d 66f7d451a68b
132 132 common heads: 2dc09a01254d
133 133
134 134 % -- b -> a set
135 135 comparing with a
136 136 query 1; heads
137 137 searching for changes
138 138 taking initial sample
139 139 searching: 2 queries
140 140 query 2; still undecided: 29, sample size is: 29
141 141 2 total queries
142 142 common heads: 2dc09a01254d
143 143
144 144
145 145 Both many new:
146 146
147 147 $ testdesc '-ra' '-rb' '
148 148 > +2:f +30 :b
149 149 > <f +30 :a'
150 150
151 151 % -- a -> b tree
152 152 comparing with b
153 153 searching for changes
154 154 unpruned common: 66f7d451a68b
155 155 common heads: 66f7d451a68b
156 156
157 157 % -- a -> b set
158 158 comparing with b
159 159 query 1; heads
160 160 searching for changes
161 161 taking quick initial sample
162 162 searching: 2 queries
163 163 query 2; still undecided: 31, sample size is: 31
164 164 2 total queries
165 165 common heads: 66f7d451a68b
166 166
167 167 % -- b -> a tree
168 168 comparing with a
169 169 searching for changes
170 170 unpruned common: 66f7d451a68b
171 171 common heads: 66f7d451a68b
172 172
173 173 % -- b -> a set
174 174 comparing with a
175 175 query 1; heads
176 176 searching for changes
177 177 taking quick initial sample
178 178 searching: 2 queries
179 179 query 2; still undecided: 31, sample size is: 31
180 180 2 total queries
181 181 common heads: 66f7d451a68b
182 182
183 183
184 184 Both many new skewed:
185 185
186 186 $ testdesc '-ra' '-rb' '
187 187 > +2:f +30 :b
188 188 > <f +50 :a'
189 189
190 190 % -- a -> b tree
191 191 comparing with b
192 192 searching for changes
193 193 unpruned common: 66f7d451a68b
194 194 common heads: 66f7d451a68b
195 195
196 196 % -- a -> b set
197 197 comparing with b
198 198 query 1; heads
199 199 searching for changes
200 200 taking quick initial sample
201 201 searching: 2 queries
202 202 query 2; still undecided: 51, sample size is: 51
203 203 2 total queries
204 204 common heads: 66f7d451a68b
205 205
206 206 % -- b -> a tree
207 207 comparing with a
208 208 searching for changes
209 209 unpruned common: 66f7d451a68b
210 210 common heads: 66f7d451a68b
211 211
212 212 % -- b -> a set
213 213 comparing with a
214 214 query 1; heads
215 215 searching for changes
216 216 taking quick initial sample
217 217 searching: 2 queries
218 218 query 2; still undecided: 31, sample size is: 31
219 219 2 total queries
220 220 common heads: 66f7d451a68b
221 221
222 222
223 223 Both many new on top of long history:
224 224
225 225 $ testdesc '-ra' '-rb' '
226 226 > +1000:f +30 :b
227 227 > <f +50 :a'
228 228
229 229 % -- a -> b tree
230 230 comparing with b
231 231 searching for changes
232 232 unpruned common: 7ead0cba2838
233 233 common heads: 7ead0cba2838
234 234
235 235 % -- a -> b set
236 236 comparing with b
237 237 query 1; heads
238 238 searching for changes
239 239 taking quick initial sample
240 240 searching: 2 queries
241 241 query 2; still undecided: 1049, sample size is: 11
242 242 sampling from both directions
243 243 searching: 3 queries
244 244 query 3; still undecided: 31, sample size is: 31
245 245 3 total queries
246 246 common heads: 7ead0cba2838
247 247
248 248 % -- b -> a tree
249 249 comparing with a
250 250 searching for changes
251 251 unpruned common: 7ead0cba2838
252 252 common heads: 7ead0cba2838
253 253
254 254 % -- b -> a set
255 255 comparing with a
256 256 query 1; heads
257 257 searching for changes
258 258 taking quick initial sample
259 259 searching: 2 queries
260 260 query 2; still undecided: 1029, sample size is: 11
261 261 sampling from both directions
262 262 searching: 3 queries
263 263 query 3; still undecided: 15, sample size is: 15
264 264 3 total queries
265 265 common heads: 7ead0cba2838
266 266
267 267
268 268 One with >200 heads, which used to use up all of the sample:
269 269
270 270 $ hg init manyheads
271 271 $ cd manyheads
272 272 $ echo "+300:r @a" >dagdesc
273 273 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
274 274 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
275 275 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
276 276 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
277 277 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
278 278 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
279 279 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
280 280 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
281 281 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
282 282 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
283 283 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
284 284 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
285 285 $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads
286 286 $ echo "@b *r+3" >>dagdesc # one more head
287 287 $ hg debugbuilddag <dagdesc
288 288 reading DAG from stdin
289 289
290 290 $ hg heads -t --template . | wc -c
291 291 \s*261 (re)
292 292
293 293 $ hg clone -b a . a
294 294 adding changesets
295 295 adding manifests
296 296 adding file changes
297 297 added 1340 changesets with 0 changes to 0 files (+259 heads)
298 298 updating to branch a
299 299 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
300 300 $ hg clone -b b . b
301 301 adding changesets
302 302 adding manifests
303 303 adding file changes
304 304 added 304 changesets with 0 changes to 0 files
305 305 updating to branch b
306 306 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
307 307
308 308 $ hg -R a debugdiscovery b --debug --verbose
309 309 comparing with b
310 310 query 1; heads
311 311 searching for changes
312 312 taking quick initial sample
313 313 searching: 2 queries
314 314 query 2; still undecided: 1080, sample size is: 260
315 315 sampling from both directions
316 316 searching: 3 queries
317 317 query 3; still undecided: 820, sample size is: 260
318 318 sampling from both directions
319 319 searching: 4 queries
320 320 query 4; still undecided: 560, sample size is: 260
321 321 sampling from both directions
322 322 searching: 5 queries
323 323 query 5; still undecided: 300, sample size is: 200
324 324 5 total queries
325 325 common heads: 3ee37d65064a
326 326
327 Test actual protocol when pulling one new head in addition to common heads
328
329 $ hg clone -U b c
330 $ hg -R c id -ir tip
331 513314ca8b3a
332 $ hg -R c up -qr default
333 $ touch c/f
334 $ hg -R c ci -Aqm "extra head"
335 $ hg -R c id -i
336 e64a39e7da8b
337
338 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
339 $ cat hg.pid >> $DAEMON_PIDS
340
341 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
342 comparing with http://localhost:$HGPORT/
343 searching for changes
344 e64a39e7da8b
345
346 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
347 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
348 "GET /?cmd=capabilities HTTP/1.1" 200 -
349 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
350 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477+513314ca8b3ae4dac8eec56966265b00fcf866db
351 $ cat errors.log
352
327 353 $ cd ..
@@ -1,502 +1,534
1 1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 Tests discovery against servers without getbundle support:
4 4
5 5 $ CAP=getbundle
6 6 $ . "$TESTDIR/notcapable"
7 7 $ cat >> $HGRCPATH <<EOF
8 8 > [ui]
9 9 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
10 10 > EOF
11 11
12 12 Setup HTTP server control:
13 13
14 14 $ remote=http://localhost:$HGPORT/
15 15 $ export remote
16 16 $ tstart() {
17 17 > echo '[web]' > $1/.hg/hgrc
18 18 > echo 'push_ssl = false' >> $1/.hg/hgrc
19 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 -A access.log -E errors.log
21 21 > cat hg.pid >> $DAEMON_PIDS
22 22 > }
23 23 $ tstop() {
24 24 > "$TESTDIR/killdaemons.py" $DAEMON_PIDS
25 > [ "$1" ] && cut -d' ' -f6- access.log && cat errors.log
26 > rm access.log errors.log
25 27 > }
26 28
27 29 Both are empty:
28 30
29 31 $ hg init empty1
30 32 $ hg init empty2
31 33 $ tstart empty2
32 34 $ hg incoming -R empty1 $remote
33 35 comparing with http://localhost:$HGPORT/
34 36 no changes found
35 37 [1]
36 38 $ hg outgoing -R empty1 $remote
37 39 comparing with http://localhost:$HGPORT/
38 40 no changes found
39 41 [1]
40 42 $ hg pull -R empty1 $remote
41 43 pulling from http://localhost:$HGPORT/
42 44 no changes found
43 45 $ hg push -R empty1 $remote
44 46 pushing to http://localhost:$HGPORT/
45 47 no changes found
46 48 [1]
47 49 $ tstop
48 50
49 51 Base repo:
50 52
51 53 $ hg init main
52 54 $ cd main
53 55 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
54 56 $ hg log -G
55 57 o 11 a19bfa7e7328: r11 both
56 58 |
57 59 o 10 8b6bad1512e1: r10 both
58 60 |
59 61 o 9 025829e08038: r9 both
60 62 |\
61 63 | o 8 d8f638ac69e9: r8 name2
62 64 | |
63 65 | o 7 b6b4d315a2ac: r7 name2
64 66 | |
65 67 | o 6 6c6f5d5f3c11: r6 name2
66 68 | |
67 69 | o 5 70314b29987d: r5 name2
68 70 | |
69 71 o | 4 e71dbbc70e03: r4 name1
70 72 | |
71 73 o | 3 2c8d5d5ec612: r3 name1
72 74 | |
73 75 o | 2 a7892891da29: r2 name1
74 76 |/
75 77 o 1 0019a3b924fd: r1
76 78 |
77 79 o 0 d57206cc072a: r0
78 80
79 81 $ cd ..
80 82 $ tstart main
81 83
82 84 Full clone:
83 85
84 86 $ hg clone main full
85 87 updating to branch default
86 88 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 89 $ cd full
88 90 $ hg incoming $remote
89 91 comparing with http://localhost:$HGPORT/
90 92 searching for changes
91 93 no changes found
92 94 [1]
93 95 $ hg outgoing $remote
94 96 comparing with http://localhost:$HGPORT/
95 97 searching for changes
96 98 no changes found
97 99 [1]
98 100 $ hg pull $remote
99 101 pulling from http://localhost:$HGPORT/
100 102 searching for changes
101 103 no changes found
102 104 $ hg push $remote
103 105 pushing to http://localhost:$HGPORT/
104 106 searching for changes
105 107 no changes found
106 108 [1]
107 109 $ cd ..
108 110
109 111 Local is empty:
110 112
111 113 $ cd empty1
112 114 $ hg incoming $remote
113 115 comparing with http://localhost:$HGPORT/
114 116 0 d57206cc072a: r0
115 117 1 0019a3b924fd: r1
116 118 2 a7892891da29: r2 name1
117 119 3 2c8d5d5ec612: r3 name1
118 120 4 e71dbbc70e03: r4 name1
119 121 5 70314b29987d: r5 name2
120 122 6 6c6f5d5f3c11: r6 name2
121 123 7 b6b4d315a2ac: r7 name2
122 124 8 d8f638ac69e9: r8 name2
123 125 9 025829e08038: r9 both
124 126 10 8b6bad1512e1: r10 both
125 127 11 a19bfa7e7328: r11 both
126 128 $ hg outgoing $remote
127 129 comparing with http://localhost:$HGPORT/
128 130 no changes found
129 131 [1]
130 132 $ hg push $remote
131 133 pushing to http://localhost:$HGPORT/
132 134 no changes found
133 135 [1]
134 136 $ hg pull $remote
135 137 pulling from http://localhost:$HGPORT/
136 138 requesting all changes
137 139 adding changesets
138 140 adding manifests
139 141 adding file changes
140 142 added 12 changesets with 24 changes to 2 files
141 143 (run 'hg update' to get a working copy)
142 144 $ hg incoming $remote
143 145 comparing with http://localhost:$HGPORT/
144 146 searching for changes
145 147 no changes found
146 148 [1]
147 149 $ cd ..
148 150
149 151 Local is subset:
150 152
151 153 $ hg clone main subset --rev name2 ; cd subset
152 154 adding changesets
153 155 adding manifests
154 156 adding file changes
155 157 added 6 changesets with 12 changes to 2 files
156 158 updating to branch name2
157 159 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 160 $ hg incoming $remote
159 161 comparing with http://localhost:$HGPORT/
160 162 searching for changes
161 163 6 a7892891da29: r2 name1
162 164 7 2c8d5d5ec612: r3 name1
163 165 8 e71dbbc70e03: r4 name1
164 166 9 025829e08038: r9 both
165 167 10 8b6bad1512e1: r10 both
166 168 11 a19bfa7e7328: r11 both
167 169 $ hg outgoing $remote
168 170 comparing with http://localhost:$HGPORT/
169 171 searching for changes
170 172 no changes found
171 173 [1]
172 174 $ hg push $remote
173 175 pushing to http://localhost:$HGPORT/
174 176 searching for changes
175 177 no changes found
176 178 [1]
177 179 $ hg pull $remote
178 180 pulling from http://localhost:$HGPORT/
179 181 searching for changes
180 182 adding changesets
181 183 adding manifests
182 184 adding file changes
183 185 added 6 changesets with 12 changes to 2 files
184 186 (run 'hg update' to get a working copy)
185 187 $ hg incoming $remote
186 188 comparing with http://localhost:$HGPORT/
187 189 searching for changes
188 190 no changes found
189 191 [1]
190 192 $ cd ..
193 $ tstop
191 194
192 195 Remote is empty:
193 196
194 $ tstop ; tstart empty2
197 $ tstart empty2
195 198 $ cd main
196 199 $ hg incoming $remote
197 200 comparing with http://localhost:$HGPORT/
198 201 searching for changes
199 202 no changes found
200 203 [1]
201 204 $ hg outgoing $remote
202 205 comparing with http://localhost:$HGPORT/
203 206 searching for changes
204 207 0 d57206cc072a: r0
205 208 1 0019a3b924fd: r1
206 209 2 a7892891da29: r2 name1
207 210 3 2c8d5d5ec612: r3 name1
208 211 4 e71dbbc70e03: r4 name1
209 212 5 70314b29987d: r5 name2
210 213 6 6c6f5d5f3c11: r6 name2
211 214 7 b6b4d315a2ac: r7 name2
212 215 8 d8f638ac69e9: r8 name2
213 216 9 025829e08038: r9 both
214 217 10 8b6bad1512e1: r10 both
215 218 11 a19bfa7e7328: r11 both
216 219 $ hg pull $remote
217 220 pulling from http://localhost:$HGPORT/
218 221 searching for changes
219 222 no changes found
220 223 $ hg push $remote
221 224 pushing to http://localhost:$HGPORT/
222 225 searching for changes
223 226 remote: adding changesets
224 227 remote: adding manifests
225 228 remote: adding file changes
226 229 remote: added 12 changesets with 24 changes to 2 files
227 230 $ hg outgoing $remote
228 231 comparing with http://localhost:$HGPORT/
229 232 searching for changes
230 233 no changes found
231 234 [1]
232 235 $ cd ..
236 $ tstop
233 237
234 238 Local is superset:
235 239
236 $ tstop
237 240 $ hg clone main subset2 --rev name2
238 241 adding changesets
239 242 adding manifests
240 243 adding file changes
241 244 added 6 changesets with 12 changes to 2 files
242 245 updating to branch name2
243 246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 247 $ tstart subset2
245 248 $ cd main
246 249 $ hg incoming $remote
247 250 comparing with http://localhost:$HGPORT/
248 251 searching for changes
249 252 no changes found
250 253 [1]
251 254 $ hg outgoing $remote
252 255 comparing with http://localhost:$HGPORT/
253 256 searching for changes
254 257 2 a7892891da29: r2 name1
255 258 3 2c8d5d5ec612: r3 name1
256 259 4 e71dbbc70e03: r4 name1
257 260 9 025829e08038: r9 both
258 261 10 8b6bad1512e1: r10 both
259 262 11 a19bfa7e7328: r11 both
260 263 $ hg pull $remote
261 264 pulling from http://localhost:$HGPORT/
262 265 searching for changes
263 266 no changes found
264 267 $ hg push $remote
265 268 pushing to http://localhost:$HGPORT/
266 269 searching for changes
267 270 abort: push creates new remote branches: both, name1!
268 271 (use 'hg push --new-branch' to create new remote branches)
269 272 [255]
270 273 $ hg push $remote --new-branch
271 274 pushing to http://localhost:$HGPORT/
272 275 searching for changes
273 276 remote: adding changesets
274 277 remote: adding manifests
275 278 remote: adding file changes
276 279 remote: added 6 changesets with 12 changes to 2 files
277 280 $ hg outgoing $remote
278 281 comparing with http://localhost:$HGPORT/
279 282 searching for changes
280 283 no changes found
281 284 [1]
282 285 $ cd ..
286 $ tstop
283 287
284 288 Partial pull:
285 289
286 $ tstop ; tstart main
290 $ tstart main
287 291 $ hg clone $remote partial --rev name2
288 292 adding changesets
289 293 adding manifests
290 294 adding file changes
291 295 added 6 changesets with 12 changes to 2 files
292 296 updating to branch name2
293 297 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
294 298 $ cd partial
295 299 $ hg incoming $remote
296 300 comparing with http://localhost:$HGPORT/
297 301 searching for changes
298 302 6 a7892891da29: r2 name1
299 303 7 2c8d5d5ec612: r3 name1
300 304 8 e71dbbc70e03: r4 name1
301 305 9 025829e08038: r9 both
302 306 10 8b6bad1512e1: r10 both
303 307 11 a19bfa7e7328: r11 both
304 308 $ hg incoming $remote --rev name1
305 309 comparing with http://localhost:$HGPORT/
306 310 searching for changes
307 311 6 a7892891da29: r2 name1
308 312 7 2c8d5d5ec612: r3 name1
309 313 8 e71dbbc70e03: r4 name1
310 314 $ hg pull $remote --rev name1
311 315 pulling from http://localhost:$HGPORT/
312 316 searching for changes
313 317 adding changesets
314 318 adding manifests
315 319 adding file changes
316 320 added 3 changesets with 6 changes to 2 files (+1 heads)
317 321 (run 'hg heads' to see heads)
318 322 $ hg incoming $remote
319 323 comparing with http://localhost:$HGPORT/
320 324 searching for changes
321 325 9 025829e08038: r9 both
322 326 10 8b6bad1512e1: r10 both
323 327 11 a19bfa7e7328: r11 both
324 328 $ cd ..
329 $ tstop
325 330
326 331 Both have new stuff in new named branches:
327 332
328 $ tstop
329 333 $ hg clone main repo1a --rev name1 -q
330 334 $ hg clone repo1a repo1b -q
331 335 $ hg clone main repo2a --rev name2 -q
332 336 $ hg clone repo2a repo2b -q
333 337 $ tstart repo1a
334 338
335 339 $ cd repo2a
336 340 $ hg incoming $remote
337 341 comparing with http://localhost:$HGPORT/
338 342 searching for changes
339 343 6 a7892891da29: r2 name1
340 344 7 2c8d5d5ec612: r3 name1
341 345 8 e71dbbc70e03: r4 name1
342 346 $ hg outgoing $remote
343 347 comparing with http://localhost:$HGPORT/
344 348 searching for changes
345 349 2 70314b29987d: r5 name2
346 350 3 6c6f5d5f3c11: r6 name2
347 351 4 b6b4d315a2ac: r7 name2
348 352 5 d8f638ac69e9: r8 name2
349 353 $ hg push $remote --new-branch
350 354 pushing to http://localhost:$HGPORT/
351 355 searching for changes
352 356 remote: adding changesets
353 357 remote: adding manifests
354 358 remote: adding file changes
355 359 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
356 360 $ hg pull $remote
357 361 pulling from http://localhost:$HGPORT/
358 362 searching for changes
359 363 adding changesets
360 364 adding manifests
361 365 adding file changes
362 366 added 3 changesets with 6 changes to 2 files (+1 heads)
363 367 (run 'hg heads' to see heads)
364 368 $ hg incoming $remote
365 369 comparing with http://localhost:$HGPORT/
366 370 searching for changes
367 371 no changes found
368 372 [1]
369 373 $ hg outgoing $remote
370 374 comparing with http://localhost:$HGPORT/
371 375 searching for changes
372 376 no changes found
373 377 [1]
374 378 $ cd ..
379 $ tstop
375 380
376 $ tstop ; tstart repo1b
381 $ tstart repo1b
377 382 $ cd repo2b
378 383 $ hg incoming $remote
379 384 comparing with http://localhost:$HGPORT/
380 385 searching for changes
381 386 6 a7892891da29: r2 name1
382 387 7 2c8d5d5ec612: r3 name1
383 388 8 e71dbbc70e03: r4 name1
384 389 $ hg outgoing $remote
385 390 comparing with http://localhost:$HGPORT/
386 391 searching for changes
387 392 2 70314b29987d: r5 name2
388 393 3 6c6f5d5f3c11: r6 name2
389 394 4 b6b4d315a2ac: r7 name2
390 395 5 d8f638ac69e9: r8 name2
391 396 $ hg pull $remote
392 397 pulling from http://localhost:$HGPORT/
393 398 searching for changes
394 399 adding changesets
395 400 adding manifests
396 401 adding file changes
397 402 added 3 changesets with 6 changes to 2 files (+1 heads)
398 403 (run 'hg heads' to see heads)
399 404 $ hg push $remote --new-branch
400 405 pushing to http://localhost:$HGPORT/
401 406 searching for changes
402 407 remote: adding changesets
403 408 remote: adding manifests
404 409 remote: adding file changes
405 410 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
406 411 $ hg incoming $remote
407 412 comparing with http://localhost:$HGPORT/
408 413 searching for changes
409 414 no changes found
410 415 [1]
411 416 $ hg outgoing $remote
412 417 comparing with http://localhost:$HGPORT/
413 418 searching for changes
414 419 no changes found
415 420 [1]
416 421 $ cd ..
422 $ tstop
417 423
418 424 Both have new stuff in existing named branches:
419 425
420 $ tstop
421 426 $ rm -r repo1a repo1b repo2a repo2b
422 427 $ hg clone main repo1a --rev 3 --rev 8 -q
423 428 $ hg clone repo1a repo1b -q
424 429 $ hg clone main repo2a --rev 4 --rev 7 -q
425 430 $ hg clone repo2a repo2b -q
426 431 $ tstart repo1a
427 432
428 433 $ cd repo2a
429 434 $ hg incoming $remote
430 435 comparing with http://localhost:$HGPORT/
431 436 searching for changes
432 437 8 d8f638ac69e9: r8 name2
433 438 $ hg outgoing $remote
434 439 comparing with http://localhost:$HGPORT/
435 440 searching for changes
436 441 4 e71dbbc70e03: r4 name1
437 442 $ hg push $remote --new-branch
438 443 pushing to http://localhost:$HGPORT/
439 444 searching for changes
440 445 remote: adding changesets
441 446 remote: adding manifests
442 447 remote: adding file changes
443 448 remote: added 1 changesets with 2 changes to 2 files
444 449 $ hg pull $remote
445 450 pulling from http://localhost:$HGPORT/
446 451 searching for changes
447 452 adding changesets
448 453 adding manifests
449 454 adding file changes
450 455 added 1 changesets with 2 changes to 2 files
451 456 (run 'hg update' to get a working copy)
452 457 $ hg incoming $remote
453 458 comparing with http://localhost:$HGPORT/
454 459 searching for changes
455 460 no changes found
456 461 [1]
457 462 $ hg outgoing $remote
458 463 comparing with http://localhost:$HGPORT/
459 464 searching for changes
460 465 no changes found
461 466 [1]
462 467 $ cd ..
468 $ tstop
463 469
464 $ tstop ; tstart repo1b
470 $ tstart repo1b
465 471 $ cd repo2b
466 472 $ hg incoming $remote
467 473 comparing with http://localhost:$HGPORT/
468 474 searching for changes
469 475 8 d8f638ac69e9: r8 name2
470 476 $ hg outgoing $remote
471 477 comparing with http://localhost:$HGPORT/
472 478 searching for changes
473 479 4 e71dbbc70e03: r4 name1
474 480 $ hg pull $remote
475 481 pulling from http://localhost:$HGPORT/
476 482 searching for changes
477 483 adding changesets
478 484 adding manifests
479 485 adding file changes
480 486 added 1 changesets with 2 changes to 2 files
481 487 (run 'hg update' to get a working copy)
482 488 $ hg push $remote --new-branch
483 489 pushing to http://localhost:$HGPORT/
484 490 searching for changes
485 491 remote: adding changesets
486 492 remote: adding manifests
487 493 remote: adding file changes
488 494 remote: added 1 changesets with 2 changes to 2 files
489 495 $ hg incoming $remote
490 496 comparing with http://localhost:$HGPORT/
491 497 searching for changes
492 498 no changes found
493 499 [1]
494 500 $ hg outgoing $remote
495 501 comparing with http://localhost:$HGPORT/
496 502 searching for changes
497 503 no changes found
498 504 [1]
499 505 $ cd ..
500
501 $ tstop
502
506 $ tstop show
507 "GET /?cmd=capabilities HTTP/1.1" 200 -
508 "GET /?cmd=heads HTTP/1.1" 200 -
509 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
510 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
511 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a
512 "GET /?cmd=capabilities HTTP/1.1" 200 -
513 "GET /?cmd=heads HTTP/1.1" 200 -
514 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
515 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
516 "GET /?cmd=capabilities HTTP/1.1" 200 -
517 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
518 "GET /?cmd=heads HTTP/1.1" 200 -
519 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
520 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
521 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a
522 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
523 "GET /?cmd=capabilities HTTP/1.1" 200 -
524 "GET /?cmd=heads HTTP/1.1" 200 -
525 "GET /?cmd=branchmap HTTP/1.1" 200 -
526 "GET /?cmd=branchmap HTTP/1.1" 200 -
527 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
528 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91
529 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
530 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
531 "GET /?cmd=capabilities HTTP/1.1" 200 -
532 "GET /?cmd=heads HTTP/1.1" 200 -
533 "GET /?cmd=capabilities HTTP/1.1" 200 -
534 "GET /?cmd=heads HTTP/1.1" 200 -
General Comments 0
You need to be logged in to leave comments. Login now