##// END OF EJS Templates
largefiles: adapt remotestore._getfile to batched statlfile...
Mads Kiilerich -
r18484:d43823f9 stable
parent child Browse files
Show More
@@ -48,11 +48,14 b' class remotestore(basestore.basestore):'
48 48
49 49 def _getfile(self, tmpfile, filename, hash):
50 50 # quit if the largefile isn't there
51 stat = self._stat(hash)
51 stat = self._stat([hash])[hash]
52 52 if stat == 1:
53 53 raise util.Abort(_('remotestore: largefile %s is invalid') % hash)
54 54 elif stat == 2:
55 55 raise util.Abort(_('remotestore: largefile %s is missing') % hash)
56 elif stat != 0:
57 raise RuntimeError('error getting file: unexpected response from '
58 'statlfile (%r)' % stat)
56 59
57 60 try:
58 61 length, infile = self._get(hash)
@@ -1574,18 +1574,16 b' largefiles pulled on update - a largefil'
1574 1574 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
1575 1575 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
1576 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
1577 abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing
1578 [255]
1580 1579 $ hg -R http-clone up -Cqr null
1581 1580
1582 1581 largefiles pulled on update - a largefile corrupted on the server:
1583 1582 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
1584 1583 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
1585 1584 getting changed largefiles
1586 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
1587 0 largefiles updated, 0 removed
1588 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1585 abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is invalid
1586 [255]
1589 1587 $ hg -R http-clone st
1590 1588 ! f1
1591 1589 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
@@ -1602,7 +1600,6 b' largefiles pulled on update - a largefil'
1602 1600 verified contents of 1 revisions of 1 largefiles
1603 1601 [1]
1604 1602 $ hg -R http-clone up -Cqr null
1605 $ rm http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
1606 1603
1607 1604 largefiles pulled on update - no server side problems:
1608 1605 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
General Comments 0
You need to be logged in to leave comments. Login now