lfs: raise an error if the server sends an unsolicited oid
This shouldn't happen. But we shouldn't ignore it if it does, because something
else is likely to go wrong.
--- a/hgext/lfs/blobstore.py Wed Jan 17 20:54:05 2018 -0500
+++ b/hgext/lfs/blobstore.py Wed Jan 17 21:44:32 2018 -0500
@@ -247,6 +247,10 @@
raise LfsRemoteError(
_(('LFS server error. Remote object '
'for "%s" not found: %r')) % (filename, response))
+ else:
+ raise LfsRemoteError(
+ _('LFS server error. Unsolicited response for oid %s')
+ % response['oid'])
if 'error' in response:
raise LfsRemoteError(_('LFS server error: %r') % response)