> On Dec 12, 2017, at 6:10 PM, Matt Harbison <mharbiso...@gmail.com> wrote:
> 
> 
>> On Dec 12, 2017, at 5:48 PM, Augie Fackler <r...@durin42.com> wrote:
>> 
>> 
>>> On Dec 12, 2017, at 17:32, Matt Harbison <mharbiso...@gmail.com> wrote:
>>> 
>>> diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
>>> --- a/hgext/lfs/blobstore.py
>>> +++ b/hgext/lfs/blobstore.py
>>> @@ -101,7 +101,10 @@ class _gitlfsremote(object):
>>>       self.ui = ui
>>>       baseurl, authinfo = url.authinfo()
>>>       self.baseurl = baseurl.rstrip('/')
>>> -        self.urlopener = urlmod.opener(ui, authinfo)
>>> +        useragent = None
>>> +        if repo.ui.configbool('experimental', 'lfs.git-user-agent'):
>>> +            useragent = 'git/2.15.1'
>> 
>> what happens if you say something like 'git/2.15.1 (compatible; Mercurial 
>> %s)' % util.version()? Does that work?
> 
> I’ll give it a try tomorrow. I suspect it will be totally dependent on the 
> particular server.
> 
> I wonder if in the future, the git version would ever be checked by 3rd party 
> servers to know what features to support, or something like that.

That works, and so does “git/2.15.1 Mercurial/4.4+3-...”, like the example here:

https://tools.ietf.org/html/rfc7231#page-46

I don’t have a particular preference.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to