Comments
Patch
@@ -48,11 +48,14 @@
def _getfile(self, tmpfile, filename, hash):
# quit if the largefile isn't there
- stat = self._stat(hash)
+ stat = self._stat([hash])[hash]
if stat == 1:
raise util.Abort(_('remotestore: largefile %s is invalid') % hash)
elif stat == 2:
raise util.Abort(_('remotestore: largefile %s is missing') % hash)
+ elif stat != 0:
+ raise RuntimeError('error getting file: unexpected response from '
+ 'statlfile (%r)' % stat)
try:
length, infile = self._get(hash)
@@ -1600,9 +1600,8 @@
try again and expect error
$ hg -R http-clone up
getting changed largefiles
- error getting id 02a439e5c31c526465ab1a0ca1f431f76b827b90 from url http://localhost:$HGPORT2/ for file f1: HTTP Error 500: Internal Server Error
- 0 largefiles updated, 0 removed
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ abort: remotestore: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 is missing
+ [255]
$ rm -rf empty http-clone http-clone-usercache