##// END OF EJS Templates
test-lfs: glob over some output changes...
Matt Harbison -
r37005:b6a4881c default
parent child Browse files
Show More
@@ -1,772 +1,772 b''
1 1 #require lfs-test-server
2 2
3 3 $ LFS_LISTEN="tcp://:$HGPORT"
4 4 $ LFS_HOST="localhost:$HGPORT"
5 5 $ LFS_PUBLIC=1
6 6 $ export LFS_LISTEN LFS_HOST LFS_PUBLIC
7 7 #if no-windows
8 8 $ lfs-test-server &> lfs-server.log &
9 9 $ echo $! >> $DAEMON_PIDS
10 10 #else
11 11 $ cat >> $TESTTMP/spawn.py <<EOF
12 12 > import os
13 13 > import subprocess
14 14 > import sys
15 15 >
16 16 > for path in os.environ["PATH"].split(os.pathsep):
17 17 > exe = os.path.join(path, 'lfs-test-server.exe')
18 18 > if os.path.exists(exe):
19 19 > with open('lfs-server.log', 'wb') as out:
20 20 > p = subprocess.Popen(exe, stdout=out, stderr=out)
21 21 > sys.stdout.write('%s\n' % p.pid)
22 22 > sys.exit(0)
23 23 > sys.exit(1)
24 24 > EOF
25 25 $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS
26 26 #endif
27 27
28 28 $ cat >> $HGRCPATH <<EOF
29 29 > [extensions]
30 30 > lfs=
31 31 > [lfs]
32 32 > url=http://foo:bar@$LFS_HOST/
33 33 > track=all()
34 34 > EOF
35 35
36 36 $ hg init repo1
37 37 $ cd repo1
38 38 $ echo THIS-IS-LFS > a
39 39 $ hg commit -m a -A a
40 40
41 41 A push can be serviced directly from the usercache if it isn't in the local
42 42 store.
43 43
44 44 $ hg init ../repo2
45 45 $ mv .hg/store/lfs .hg/store/lfs_
46 46 $ hg push ../repo2 --debug
47 47 http auth: user foo, password ***
48 48 pushing to ../repo2
49 49 http auth: user foo, password ***
50 50 query 1; heads
51 51 searching for changes
52 52 1 total queries in *s (glob)
53 53 listing keys for "phases"
54 54 checking for updated bookmarks
55 55 listing keys for "bookmarks"
56 56 lfs: computing set of blobs to upload
57 57 Status: 200
58 58 Content-Length: 309
59 59 Content-Type: application/vnd.git-lfs+json
60 60 Date: $HTTP_DATE$
61 61 {
62 62 "objects": [
63 63 {
64 64 "actions": {
65 65 "upload": {
66 66 "expires_at": "$ISO_8601_DATE_TIME$",
67 67 "header": {
68 68 "Accept": "application/vnd.git-lfs"
69 69 },
70 70 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
71 71 }
72 72 },
73 73 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
74 74 "size": 12
75 75 }
76 76 ]
77 77 }
78 78 lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
79 79 Status: 200
80 80 Content-Length: 0
81 81 Content-Type: text/plain; charset=utf-8
82 82 Date: $HTTP_DATE$
83 83 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
84 84 lfs: uploaded 1 files (12 bytes)
85 85 1 changesets found
86 86 list of changesets:
87 87 99a7098854a3984a5c9eab0fc7a2906697b7cb5c
88 88 bundle2-output-bundle: "HG20", 4 parts total
89 bundle2-output-part: "replycaps" 191 bytes payload
89 bundle2-output-part: "replycaps" * bytes payload (glob)
90 90 bundle2-output-part: "check:heads" streamed payload
91 91 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
92 92 bundle2-output-part: "phase-heads" 24 bytes payload
93 93 bundle2-input-bundle: with-transaction
94 94 bundle2-input-part: "replycaps" supported
95 bundle2-input-part: total payload size 191
95 bundle2-input-part: total payload size * (glob)
96 96 bundle2-input-part: "check:heads" supported
97 97 bundle2-input-part: total payload size 20
98 98 bundle2-input-part: "changegroup" (params: 1 mandatory) supported
99 99 adding changesets
100 100 add changeset 99a7098854a3
101 101 adding manifests
102 102 adding file changes
103 103 adding a revisions
104 104 added 1 changesets with 1 changes to 1 files
105 105 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
106 106 bundle2-input-part: total payload size 617
107 107 bundle2-input-part: "phase-heads" supported
108 108 bundle2-input-part: total payload size 24
109 109 bundle2-input-bundle: 3 parts total
110 110 updating the branch cache
111 111 bundle2-output-bundle: "HG20", 1 parts total
112 112 bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
113 113 bundle2-input-bundle: no-transaction
114 114 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
115 115 bundle2-input-bundle: 0 parts total
116 116 listing keys for "phases"
117 117 $ mv .hg/store/lfs_ .hg/store/lfs
118 118
119 119 Clear the cache to force a download
120 120 $ rm -rf `hg config lfs.usercache`
121 121 $ cd ../repo2
122 122 $ hg update tip --debug
123 123 http auth: user foo, password ***
124 124 resolving manifests
125 125 branchmerge: False, force: False, partial: False
126 126 ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3
127 127 Status: 200
128 128 Content-Length: 311
129 129 Content-Type: application/vnd.git-lfs+json
130 130 Date: $HTTP_DATE$
131 131 {
132 132 "objects": [
133 133 {
134 134 "actions": {
135 135 "download": {
136 136 "expires_at": "$ISO_8601_DATE_TIME$",
137 137 "header": {
138 138 "Accept": "application/vnd.git-lfs"
139 139 },
140 140 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
141 141 }
142 142 },
143 143 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
144 144 "size": 12
145 145 }
146 146 ]
147 147 }
148 148 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
149 149 Status: 200
150 150 Content-Length: 12
151 151 Content-Type: text/plain; charset=utf-8
152 152 Date: $HTTP_DATE$
153 153 lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
154 154 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
155 155 a: remote created -> g
156 156 getting a
157 157 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
158 158 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 159
160 160 When the server has some blobs already
161 161
162 162 $ hg mv a b
163 163 $ echo ANOTHER-LARGE-FILE > c
164 164 $ echo ANOTHER-LARGE-FILE2 > d
165 165 $ hg commit -m b-and-c -A b c d
166 166 $ hg push ../repo1 --debug
167 167 http auth: user foo, password ***
168 168 pushing to ../repo1
169 169 http auth: user foo, password ***
170 170 query 1; heads
171 171 searching for changes
172 172 all remote heads known locally
173 173 listing keys for "phases"
174 174 checking for updated bookmarks
175 175 listing keys for "bookmarks"
176 176 listing keys for "bookmarks"
177 177 lfs: computing set of blobs to upload
178 178 Status: 200
179 179 Content-Length: 901
180 180 Content-Type: application/vnd.git-lfs+json
181 181 Date: $HTTP_DATE$
182 182 {
183 183 "objects": [
184 184 {
185 185 "actions": {
186 186 "download": {
187 187 "expires_at": "$ISO_8601_DATE_TIME$",
188 188 "header": {
189 189 "Accept": "application/vnd.git-lfs"
190 190 },
191 191 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
192 192 }
193 193 },
194 194 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
195 195 "size": 12
196 196 },
197 197 {
198 198 "actions": {
199 199 "upload": {
200 200 "expires_at": "$ISO_8601_DATE_TIME$",
201 201 "header": {
202 202 "Accept": "application/vnd.git-lfs"
203 203 },
204 204 "href": "http://localhost:$HGPORT/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
205 205 }
206 206 },
207 207 "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19",
208 208 "size": 20
209 209 },
210 210 {
211 211 "actions": {
212 212 "upload": {
213 213 "expires_at": "$ISO_8601_DATE_TIME$",
214 214 "header": {
215 215 "Accept": "application/vnd.git-lfs"
216 216 },
217 217 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
218 218 }
219 219 },
220 220 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
221 221 "size": 19
222 222 }
223 223 ]
224 224 }
225 225 lfs: need to transfer 2 objects (39 bytes)
226 226 lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
227 227 Status: 200
228 228 Content-Length: 0
229 229 Content-Type: text/plain; charset=utf-8
230 230 Date: $HTTP_DATE$
231 231 lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
232 232 lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
233 233 Status: 200
234 234 Content-Length: 0
235 235 Content-Type: text/plain; charset=utf-8
236 236 Date: $HTTP_DATE$
237 237 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
238 238 lfs: uploaded 2 files (39 bytes)
239 239 1 changesets found
240 240 list of changesets:
241 241 dfca2c9e2ef24996aa61ba2abd99277d884b3d63
242 242 bundle2-output-bundle: "HG20", 5 parts total
243 bundle2-output-part: "replycaps" 191 bytes payload
243 bundle2-output-part: "replycaps" * bytes payload (glob)
244 244 bundle2-output-part: "check:phases" 24 bytes payload
245 245 bundle2-output-part: "check:heads" streamed payload
246 246 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
247 247 bundle2-output-part: "phase-heads" 24 bytes payload
248 248 bundle2-input-bundle: with-transaction
249 249 bundle2-input-part: "replycaps" supported
250 bundle2-input-part: total payload size 191
250 bundle2-input-part: total payload size * (glob)
251 251 bundle2-input-part: "check:phases" supported
252 252 bundle2-input-part: total payload size 24
253 253 bundle2-input-part: "check:heads" supported
254 254 bundle2-input-part: total payload size 20
255 255 bundle2-input-part: "changegroup" (params: 1 mandatory) supported
256 256 adding changesets
257 257 add changeset dfca2c9e2ef2
258 258 adding manifests
259 259 adding file changes
260 260 adding b revisions
261 261 adding c revisions
262 262 adding d revisions
263 263 added 1 changesets with 3 changes to 3 files
264 264 bundle2-input-part: total payload size 1315
265 265 bundle2-input-part: "phase-heads" supported
266 266 bundle2-input-part: total payload size 24
267 267 bundle2-input-bundle: 4 parts total
268 268 updating the branch cache
269 269 bundle2-output-bundle: "HG20", 1 parts total
270 270 bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
271 271 bundle2-input-bundle: no-transaction
272 272 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
273 273 bundle2-input-bundle: 0 parts total
274 274 listing keys for "phases"
275 275
276 276 Clear the cache to force a download
277 277 $ rm -rf `hg config lfs.usercache`
278 278 $ hg --repo ../repo1 update tip --debug
279 279 http auth: user foo, password ***
280 280 resolving manifests
281 281 branchmerge: False, force: False, partial: False
282 282 ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2
283 283 Status: 200
284 284 Content-Length: 608
285 285 Content-Type: application/vnd.git-lfs+json
286 286 Date: $HTTP_DATE$
287 287 {
288 288 "objects": [
289 289 {
290 290 "actions": {
291 291 "download": {
292 292 "expires_at": "$ISO_8601_DATE_TIME$",
293 293 "header": {
294 294 "Accept": "application/vnd.git-lfs"
295 295 },
296 296 "href": "http://localhost:$HGPORT/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
297 297 }
298 298 },
299 299 "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19",
300 300 "size": 20
301 301 },
302 302 {
303 303 "actions": {
304 304 "download": {
305 305 "expires_at": "$ISO_8601_DATE_TIME$",
306 306 "header": {
307 307 "Accept": "application/vnd.git-lfs"
308 308 },
309 309 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
310 310 }
311 311 },
312 312 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
313 313 "size": 19
314 314 }
315 315 ]
316 316 }
317 317 lfs: need to transfer 2 objects (39 bytes)
318 318 lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
319 319 Status: 200
320 320 Content-Length: 20
321 321 Content-Type: text/plain; charset=utf-8
322 322 Date: $HTTP_DATE$
323 323 lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
324 324 lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
325 325 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
326 326 Status: 200
327 327 Content-Length: 19
328 328 Content-Type: text/plain; charset=utf-8
329 329 Date: $HTTP_DATE$
330 330 lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
331 331 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
332 332 b: remote created -> g
333 333 getting b
334 334 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
335 335 c: remote created -> g
336 336 getting c
337 337 lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
338 338 d: remote created -> g
339 339 getting d
340 340 lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
341 341 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
342 342
343 343 Test a corrupt file download, but clear the cache first to force a download.
344 344
345 345 $ rm -rf `hg config lfs.usercache`
346 346 $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob
347 347 $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
348 348 $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
349 349 $ rm ../repo1/*
350 350
351 351 $ hg --repo ../repo1 update -C tip --debug
352 352 http auth: user foo, password ***
353 353 resolving manifests
354 354 branchmerge: False, force: True, partial: False
355 355 ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2
356 356 Status: 200
357 357 Content-Length: 311
358 358 Content-Type: application/vnd.git-lfs+json
359 359 Date: $HTTP_DATE$
360 360 {
361 361 "objects": [
362 362 {
363 363 "actions": {
364 364 "download": {
365 365 "expires_at": "$ISO_8601_DATE_TIME$",
366 366 "header": {
367 367 "Accept": "application/vnd.git-lfs"
368 368 },
369 369 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
370 370 }
371 371 },
372 372 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
373 373 "size": 19
374 374 }
375 375 ]
376 376 }
377 377 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
378 378 Status: 200
379 379 Content-Length: 7
380 380 Content-Type: text/plain; charset=utf-8
381 381 Date: $HTTP_DATE$
382 382 abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
383 383 [255]
384 384
385 385 The corrupted blob is not added to the usercache or local store
386 386
387 387 $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
388 388 [1]
389 389 $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
390 390 [1]
391 391 $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
392 392
393 393 Test a corrupted file upload
394 394
395 395 $ echo 'another lfs blob' > b
396 396 $ hg ci -m 'another blob'
397 397 $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0
398 398 $ hg push --debug ../repo1
399 399 http auth: user foo, password ***
400 400 pushing to ../repo1
401 401 http auth: user foo, password ***
402 402 query 1; heads
403 403 searching for changes
404 404 all remote heads known locally
405 405 listing keys for "phases"
406 406 checking for updated bookmarks
407 407 listing keys for "bookmarks"
408 408 listing keys for "bookmarks"
409 409 lfs: computing set of blobs to upload
410 410 Status: 200
411 411 Content-Length: 309
412 412 Content-Type: application/vnd.git-lfs+json
413 413 Date: $HTTP_DATE$
414 414 {
415 415 "objects": [
416 416 {
417 417 "actions": {
418 418 "upload": {
419 419 "expires_at": "$ISO_8601_DATE_TIME$",
420 420 "header": {
421 421 "Accept": "application/vnd.git-lfs"
422 422 },
423 423 "href": "http://localhost:$HGPORT/objects/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0"
424 424 }
425 425 },
426 426 "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0",
427 427 "size": 17
428 428 }
429 429 ]
430 430 }
431 431 lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes)
432 432 abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0
433 433 (run hg verify)
434 434 [255]
435 435
436 436 Archive will prefetch blobs in a group
437 437
438 438 $ rm -rf .hg/store/lfs `hg config lfs.usercache`
439 439 $ hg archive --debug -r 1 ../archive
440 440 http auth: user foo, password ***
441 441 Status: 200
442 442 Content-Length: 905
443 443 Content-Type: application/vnd.git-lfs+json
444 444 Date: $HTTP_DATE$
445 445 {
446 446 "objects": [
447 447 {
448 448 "actions": {
449 449 "download": {
450 450 "expires_at": "$ISO_8601_DATE_TIME$",
451 451 "header": {
452 452 "Accept": "application/vnd.git-lfs"
453 453 },
454 454 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
455 455 }
456 456 },
457 457 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
458 458 "size": 12
459 459 },
460 460 {
461 461 "actions": {
462 462 "download": {
463 463 "expires_at": "$ISO_8601_DATE_TIME$",
464 464 "header": {
465 465 "Accept": "application/vnd.git-lfs"
466 466 },
467 467 "href": "http://localhost:$HGPORT/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
468 468 }
469 469 },
470 470 "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19",
471 471 "size": 20
472 472 },
473 473 {
474 474 "actions": {
475 475 "download": {
476 476 "expires_at": "$ISO_8601_DATE_TIME$",
477 477 "header": {
478 478 "Accept": "application/vnd.git-lfs"
479 479 },
480 480 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
481 481 }
482 482 },
483 483 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
484 484 "size": 19
485 485 }
486 486 ]
487 487 }
488 488 lfs: need to transfer 3 objects (51 bytes)
489 489 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
490 490 Status: 200
491 491 Content-Length: 12
492 492 Content-Type: text/plain; charset=utf-8
493 493 Date: $HTTP_DATE$
494 494 lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
495 495 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
496 496 lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
497 497 Status: 200
498 498 Content-Length: 20
499 499 Content-Type: text/plain; charset=utf-8
500 500 Date: $HTTP_DATE$
501 501 lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
502 502 lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
503 503 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
504 504 Status: 200
505 505 Content-Length: 19
506 506 Content-Type: text/plain; charset=utf-8
507 507 Date: $HTTP_DATE$
508 508 lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
509 509 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
510 510 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
511 511 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
512 512 lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
513 513 lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
514 514 $ find ../archive | sort
515 515 ../archive
516 516 ../archive/.hg_archival.txt
517 517 ../archive/a
518 518 ../archive/b
519 519 ../archive/c
520 520 ../archive/d
521 521
522 522 Cat will prefetch blobs in a group
523 523
524 524 $ rm -rf .hg/store/lfs `hg config lfs.usercache`
525 525 $ hg cat --debug -r 1 a b c
526 526 http auth: user foo, password ***
527 527 Status: 200
528 528 Content-Length: 608
529 529 Content-Type: application/vnd.git-lfs+json
530 530 Date: $HTTP_DATE$
531 531 {
532 532 "objects": [
533 533 {
534 534 "actions": {
535 535 "download": {
536 536 "expires_at": "$ISO_8601_DATE_TIME$",
537 537 "header": {
538 538 "Accept": "application/vnd.git-lfs"
539 539 },
540 540 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
541 541 }
542 542 },
543 543 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
544 544 "size": 12
545 545 },
546 546 {
547 547 "actions": {
548 548 "download": {
549 549 "expires_at": "$ISO_8601_DATE_TIME$",
550 550 "header": {
551 551 "Accept": "application/vnd.git-lfs"
552 552 },
553 553 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
554 554 }
555 555 },
556 556 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
557 557 "size": 19
558 558 }
559 559 ]
560 560 }
561 561 lfs: need to transfer 2 objects (31 bytes)
562 562 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
563 563 Status: 200
564 564 Content-Length: 12
565 565 Content-Type: text/plain; charset=utf-8
566 566 Date: $HTTP_DATE$
567 567 lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
568 568 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
569 569 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
570 570 Status: 200
571 571 Content-Length: 19
572 572 Content-Type: text/plain; charset=utf-8
573 573 Date: $HTTP_DATE$
574 574 lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
575 575 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
576 576 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
577 577 THIS-IS-LFS
578 578 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
579 579 THIS-IS-LFS
580 580 lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
581 581 ANOTHER-LARGE-FILE
582 582
583 583 Revert will prefetch blobs in a group
584 584
585 585 $ rm -rf .hg/store/lfs
586 586 $ rm -rf `hg config lfs.usercache`
587 587 $ rm *
588 588 $ hg revert --all -r 1 --debug
589 589 http auth: user foo, password ***
590 590 adding a
591 591 reverting b
592 592 reverting c
593 593 reverting d
594 594 Status: 200
595 595 Content-Length: 905
596 596 Content-Type: application/vnd.git-lfs+json
597 597 Date: $HTTP_DATE$
598 598 {
599 599 "objects": [
600 600 {
601 601 "actions": {
602 602 "download": {
603 603 "expires_at": "$ISO_8601_DATE_TIME$",
604 604 "header": {
605 605 "Accept": "application/vnd.git-lfs"
606 606 },
607 607 "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
608 608 }
609 609 },
610 610 "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b",
611 611 "size": 12
612 612 },
613 613 {
614 614 "actions": {
615 615 "download": {
616 616 "expires_at": "$ISO_8601_DATE_TIME$",
617 617 "header": {
618 618 "Accept": "application/vnd.git-lfs"
619 619 },
620 620 "href": "http://localhost:$HGPORT/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19"
621 621 }
622 622 },
623 623 "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19",
624 624 "size": 20
625 625 },
626 626 {
627 627 "actions": {
628 628 "download": {
629 629 "expires_at": "$ISO_8601_DATE_TIME$",
630 630 "header": {
631 631 "Accept": "application/vnd.git-lfs"
632 632 },
633 633 "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998"
634 634 }
635 635 },
636 636 "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998",
637 637 "size": 19
638 638 }
639 639 ]
640 640 }
641 641 lfs: need to transfer 3 objects (51 bytes)
642 642 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
643 643 Status: 200
644 644 Content-Length: 12
645 645 Content-Type: text/plain; charset=utf-8
646 646 Date: $HTTP_DATE$
647 647 lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
648 648 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
649 649 lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
650 650 Status: 200
651 651 Content-Length: 20
652 652 Content-Type: text/plain; charset=utf-8
653 653 Date: $HTTP_DATE$
654 654 lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
655 655 lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
656 656 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
657 657 Status: 200
658 658 Content-Length: 19
659 659 Content-Type: text/plain; charset=utf-8
660 660 Date: $HTTP_DATE$
661 661 lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
662 662 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
663 663 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
664 664 lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
665 665 lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
666 666 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
667 667
668 668 Check error message when the remote missed a blob:
669 669
670 670 $ echo FFFFF > b
671 671 $ hg commit -m b -A b
672 672 $ echo FFFFF >> b
673 673 $ hg commit -m b b
674 674 $ rm -rf .hg/store/lfs
675 675 $ rm -rf `hg config lfs.usercache`
676 676 $ hg update -C '.^' --debug
677 677 http auth: user foo, password ***
678 678 resolving manifests
679 679 branchmerge: False, force: True, partial: False
680 680 ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e
681 681 Status: 200
682 682 Content-Length: 308
683 683 Content-Type: application/vnd.git-lfs+json
684 684 Date: $HTTP_DATE$
685 685 {
686 686 "objects": [
687 687 {
688 688 "actions": {
689 689 "upload": {
690 690 "expires_at": "$ISO_8601_DATE_TIME$",
691 691 "header": {
692 692 "Accept": "application/vnd.git-lfs"
693 693 },
694 694 "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13"
695 695 }
696 696 },
697 697 "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13",
698 698 "size": 6
699 699 }
700 700 ]
701 701 }
702 702 abort: LFS server error. Remote object for "b" not found:(.*)! (re)
703 703 [255]
704 704
705 705 Check error message when object does not exist:
706 706
707 707 $ cd $TESTTMP
708 708 $ hg init test && cd test
709 709 $ echo "[extensions]" >> .hg/hgrc
710 710 $ echo "lfs=" >> .hg/hgrc
711 711 $ echo "[lfs]" >> .hg/hgrc
712 712 $ echo "threshold=1" >> .hg/hgrc
713 713 $ echo a > a
714 714 $ hg add a
715 715 $ hg commit -m 'test'
716 716 $ echo aaaaa > a
717 717 $ hg commit -m 'largefile'
718 718 $ hg debugdata .hg/store/data/a.i 1 # verify this is no the file content but includes "oid", the LFS "pointer".
719 719 version https://git-lfs.github.com/spec/v1
720 720 oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a
721 721 size 6
722 722 x-is-binary 0
723 723 $ cd ..
724 724 $ rm -rf `hg config lfs.usercache`
725 725
726 726 (Restart the server in a different location so it no longer has the content)
727 727
728 728 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
729 729 $ rm $DAEMON_PIDS
730 730 $ mkdir $TESTTMP/lfs-server2
731 731 $ cd $TESTTMP/lfs-server2
732 732 #if no-windows
733 733 $ lfs-test-server &> lfs-server.log &
734 734 $ echo $! >> $DAEMON_PIDS
735 735 #else
736 736 $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS
737 737 #endif
738 738
739 739 $ cd $TESTTMP
740 740 $ hg --debug clone test test2
741 741 http auth: user foo, password ***
742 742 linked 6 files
743 743 http auth: user foo, password ***
744 744 updating to branch default
745 745 resolving manifests
746 746 branchmerge: False, force: False, partial: False
747 747 ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8
748 748 Status: 200
749 749 Content-Length: 308
750 750 Content-Type: application/vnd.git-lfs+json
751 751 Date: $HTTP_DATE$
752 752 {
753 753 "objects": [
754 754 {
755 755 "actions": {
756 756 "upload": {
757 757 "expires_at": "$ISO_8601_DATE_TIME$",
758 758 "header": {
759 759 "Accept": "application/vnd.git-lfs"
760 760 },
761 761 "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a"
762 762 }
763 763 },
764 764 "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a",
765 765 "size": 6
766 766 }
767 767 ]
768 768 }
769 769 abort: LFS server error. Remote object for "a" not found:(.*)! (re)
770 770 [255]
771 771
772 772 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
General Comments 0
You need to be logged in to leave comments. Login now