comparison tests/test-largefiles-wireproto.t @ 29218:fd288d118074

largefiles: send statlfile remote calls only for nonexisting locally files Files that are already in local store should be checked locally. The problem with this implementation is how difference in messages between local and remote checks should look like. For now local errors for file missing and content corrupted looks like this: 'changeset cset: filename references missing storepath\n' 'changeset cset: filename references corrupted storepath\n' for remote it looks like: 'changeset cset: filename missing\n' 'changeset cset: filename: contents differ\n' Contents differ error for remote calls is never raised currently - for now statlfile implementation lacks checking file content.
author liscju <piotr.listkiewicz@gmail.com>
date Mon, 09 May 2016 10:05:32 +0200
parents 305f9c36a0f5
children fc777c855d66
comparison
equal deleted inserted replaced
29217:2f9ad6ca19c2 29218:fd288d118074
322 A b 322 A b
323 $ cd .. 323 $ cd ..
324 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \ 324 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
325 > -A access.log 325 > -A access.log
326 $ cat hg.pid >> $DAEMON_PIDS 326 $ cat hg.pid >> $DAEMON_PIDS
327 $ hg clone http://localhost:$HGPORT batchverifyclone 327 $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
328 requesting all changes 328 requesting all changes
329 adding changesets 329 adding changesets
330 adding manifests 330 adding manifests
331 adding file changes 331 adding file changes
332 added 2 changesets with 2 changes to 2 files 332 added 2 changesets with 2 changes to 2 files
333 updating to branch default 333 $ hg -R batchverifyclone verify --large --lfa
334 getting changed largefiles
335 2 largefiles updated, 0 removed
336 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 $ hg -R batchverifyclone verify --large
338 checking changesets 334 checking changesets
339 checking manifests 335 checking manifests
340 crosschecking files in changesets and manifests 336 crosschecking files in changesets and manifests
341 checking files 337 checking files
342 2 files, 2 changesets, 2 total revisions 338 2 files, 2 changesets, 2 total revisions
343 searching 1 changesets for largefiles 339 searching 2 changesets for largefiles
344 verified existence of 2 revisions of 2 largefiles 340 verified existence of 2 revisions of 2 largefiles
345 $ tail -1 access.log 341 $ tail -1 access.log
346 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a (glob) 342 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a (glob)
347 $ rm access.log 343 $ hg -R batchverifyclone update
344 getting changed largefiles
345 2 largefiles updated, 0 removed
346 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
347
348 Clear log file before next test
349
350 $ printf "" > access.log
351
352 Verify should check file on remote server only when file is not
353 available locally.
354
355 $ echo "ccc" >> batchverifymain/c
356 $ hg -R batchverifymain status
357 ? c
358 $ hg -R batchverifymain add --large batchverifymain/c
359 $ hg -R batchverifymain commit -m "c"
360 Invoking status precommit hook
361 A c
362 $ hg -R batchverifyclone pull
363 pulling from http://localhost:$HGPORT/
364 searching for changes
365 adding changesets
366 adding manifests
367 adding file changes
368 added 1 changesets with 1 changes to 1 files
369 (run 'hg update' to get a working copy)
370 $ hg -R batchverifyclone verify --lfa
371 checking changesets
372 checking manifests
373 crosschecking files in changesets and manifests
374 checking files
375 3 files, 3 changesets, 3 total revisions
376 searching 3 changesets for largefiles
377 verified existence of 3 revisions of 3 largefiles
378 $ tail -1 access.log
379 127.0.0.1 - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c (glob)
348 380
349 $ killdaemons.py 381 $ killdaemons.py
350 382
351 #endif 383 #endif