[PATCH 3 of 3] lfs: dump the full response on httperror in debug mode
Matt Harbison
mharbison72 at gmail.com
Thu Jan 18 18:51:43 EST 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1516316696 18000
# Thu Jan 18 18:04:56 2018 -0500
# Node ID ace830f0f944ae48b482e224fa8e8f557f092741
# Parent b25b315be2f43cefdb364e52aa614ee3dcddefed
lfs: dump the full response on httperror in debug mode
This was immensely helpful in diagnosing the 500: Internal Server Error when
using workers to upload. It's a nasty wall of html, so we really can't do
anything else with it.
diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -312,6 +312,8 @@ class _gitlfsremote(object):
if response:
self.ui.debug('lfs %s response: %s' % (action, response))
except util.urlerr.httperror as ex:
+ if self.ui.debugflag:
+ self.ui.write('%s: %s' % (oid, ex.read()))
raise LfsRemoteError(_('HTTP error: %s (oid=%s, action=%s)')
% (ex, oid, action))
More information about the Mercurial-devel
mailing list