lfs: raise an error if the server sends an unsolicited oid
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 17 Jan 2018 21:44:32 -0500
changeset 35695 dd672e3d059f
parent 35694 8a23082f4d93
child 35696 925107e37619
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.
hgext/lfs/blobstore.py
--- 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)