Mercurial > hg
comparison tests/test-largefiles.t @ 18484:d43823f928fe stable
largefiles: adapt remotestore._getfile to batched statlfile
9e1616307c4c introduced batching of statlfile, but not all codepaths got
converted.
_getfile gave _stat garbage and got garbage back. The garbage didn't match the
expected error codes and was thus interpreted as success. It could thus end up
trying to fetch a largefile that didn't exist.
Instead we now pass _stat valid input and handle both correct and invalid
output correctly.
This makes the code work as intended ... but it would probably be better if it
didn't abort on missing largefiles, just like it happened to do before.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 28 Jan 2013 15:19:44 +0100 |
parents | ce5f529deb36 |
children | 39cecda9ff77 |
comparison
equal
deleted
inserted
replaced
18483:ce5f529deb36 | 18484:d43823f928fe |
---|---|
1572 | 1572 |
1573 largefiles pulled on update - a largefile missing on the server: | 1573 largefiles pulled on update - a largefile missing on the server: |
1574 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . | 1574 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 . |
1575 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | 1575 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
1576 getting changed largefiles | 1576 getting changed largefiles |
1577 error getting id 02a439e5c31c526465ab1a0ca1f431f76b827b90 from url http://localhost:$HGPORT2/ for file f1: HTTP Error 500: Internal Server Error | 1577 abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing |
1578 0 largefiles updated, 0 removed | 1578 [255] |
1579 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1580 $ hg -R http-clone up -Cqr null | 1579 $ hg -R http-clone up -Cqr null |
1581 | 1580 |
1582 largefiles pulled on update - a largefile corrupted on the server: | 1581 largefiles pulled on update - a largefile corrupted on the server: |
1583 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | 1582 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 |
1584 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache | 1583 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache |
1585 getting changed largefiles | 1584 getting changed largefiles |
1586 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27) | 1585 abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is invalid |
1587 0 largefiles updated, 0 removed | 1586 [255] |
1588 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1589 $ hg -R http-clone st | 1587 $ hg -R http-clone st |
1590 ! f1 | 1588 ! f1 |
1591 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] | 1589 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ] |
1592 $ [ ! -f http-clone/f1 ] | 1590 $ [ ! -f http-clone/f1 ] |
1593 $ [ ! -f http-clone-usercache ] | 1591 $ [ ! -f http-clone-usercache ] |
1600 searching 1 changesets for largefiles | 1598 searching 1 changesets for largefiles |
1601 changeset 0:cf03e5bb9936: f1: contents differ | 1599 changeset 0:cf03e5bb9936: f1: contents differ |
1602 verified contents of 1 revisions of 1 largefiles | 1600 verified contents of 1 revisions of 1 largefiles |
1603 [1] | 1601 [1] |
1604 $ hg -R http-clone up -Cqr null | 1602 $ hg -R http-clone up -Cqr null |
1605 $ rm http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 | |
1606 | 1603 |
1607 largefiles pulled on update - no server side problems: | 1604 largefiles pulled on update - no server side problems: |
1608 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ | 1605 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/ |
1609 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache | 1606 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache |
1610 resolving manifests | 1607 resolving manifests |