[PATCH 3 of 3] lfs: dump the full response on httperror in debug mode

Yuya Nishihara yuya at tcha.org
Fri Jan 19 10:14:12 EST 2018


On Thu, 18 Jan 2018 18:51:43 -0500, Matt Harbison wrote:
> # 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

Also queued, thanks.

> 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()))

s/ui.write/ui.debug/ so outputs are labeled.

The format string is unchanged. I have no idea if ex.read() is terminated by
'\n'.


More information about the Mercurial-devel mailing list