##// END OF EJS Templates
largefiles: adapt verify to batched remote statlfile (issue3780)...
Mads Kiilerich -
r18482:6f219eb8 stable
parent child Browse files
Show More
@@ -87,7 +87,8 b' class remotestore(basestore.basestore):'
87
87
88 verified.add(key)
88 verified.add(key)
89
89
90 stat = self._stat(hash)
90 expecthash = fctx.data()[0:40]
91 stat = self._stat([expecthash])[expecthash]
91 if not stat:
92 if not stat:
92 return False
93 return False
93 elif stat == 1:
94 elif stat == 1:
@@ -1539,11 +1539,75 b' Push a largefiles repository to a served'
1539 remote: adding manifests
1539 remote: adding manifests
1540 remote: adding file changes
1540 remote: adding file changes
1541 remote: added 1 changesets with 1 changes to 1 files
1541 remote: added 1 changesets with 1 changes to 1 files
1542 $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
1543 $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
1542
1544
1543 Clone over http, with largefiles being pulled on update, not on clone.
1545 Clone over http, no largefiles pulled on clone.
1546
1547 $ hg clone http://localhost:$HGPORT2/ http-clone -U
1548 requesting all changes
1549 adding changesets
1550 adding manifests
1551 adding file changes
1552 added 1 changesets with 1 changes to 1 files
1553
1554 test 'verify' with remotestore:
1555
1556 $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
1557 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
1558 $ hg -R http-clone verify --large --lfa
1559 checking changesets
1560 checking manifests
1561 crosschecking files in changesets and manifests
1562 checking files
1563 1 files, 1 changesets, 1 total revisions
1564 searching 1 changesets for largefiles
1565 changeset 0:cf03e5bb9936: f1 missing
1566 verified existence of 1 revisions of 1 largefiles
1567 [1]
1568 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
1569 $ hg -R http-clone -q verify --large --lfa
1570 searching 1 changesets for largefiles
1571 verified existence of 1 revisions of 1 largefiles
1544
1572
1545 $ hg clone -q http://localhost:$HGPORT2/ http-clone -U
1573 largefiles pulled on update - a largefile missing on the server:
1574 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
1575 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
1576 getting changed largefiles
1577 error getting id 02a439e5c31c526465ab1a0ca1f431f76b827b90 from url http://localhost:$HGPORT2/ for file f1: HTTP Error 500: Internal Server Error
1578 0 largefiles updated, 0 removed
1579 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1580 $ hg -R http-clone up -Cqr null
1546
1581
1582 largefiles pulled on update - a largefile corrupted on the server:
1583 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
1584 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
1585 getting changed largefiles
1586 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
1587 1 largefiles updated, 0 removed
1588 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1589 $ hg -R http-clone st
1590 M f1
1591 $ cat http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
1592 corruption
1593 $ cat http-clone/f1
1594 corruption
1595 $ [ ! -f http-clone-usercache ]
1596 $ hg -R http-clone verify --large --lfc
1597 checking changesets
1598 checking manifests
1599 crosschecking files in changesets and manifests
1600 checking files
1601 1 files, 1 changesets, 1 total revisions
1602 searching 1 changesets for largefiles
1603 changeset 0:cf03e5bb9936: f1: contents differ
1604 verified contents of 1 revisions of 1 largefiles
1605 [1]
1606 $ hg -R http-clone up -Cqr null
1607 $ rm http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
1608
1609 largefiles pulled on update - no server side problems:
1610 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
1547 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache
1611 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache
1548 resolving manifests
1612 resolving manifests
1549 overwrite: False, partial: False
1613 overwrite: False, partial: False
@@ -1565,7 +1629,7 b' Clone over http, with largefiles being p'
1565 $ ls http-clone-usercache/*
1629 $ ls http-clone-usercache/*
1566 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
1630 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
1567
1631
1568 $ rm -rf empty http-clone http-clone-usercache
1632 $ rm -rf empty http-clone*
1569
1633
1570 used all HGPORTs, kill all daemons
1634 used all HGPORTs, kill all daemons
1571 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1635 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
General Comments 0
You need to be logged in to leave comments. Login now