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

Matt Harbison mharbison72 at gmail.com
Fri Jan 19 11:07:50 EST 2018


> On Jan 19, 2018, at 10:14 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> 
>> 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'.

Looking at the example again, it’s not. I’ll follow up unless you can amend it.



More information about the Mercurial-devel mailing list