Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 42109:2a3c0106ded9
import: suppress accept: header
irccloud and others may perform content negotation and reject (406)
if the accept header does not match the mime type of the object
author | timeless <timeless@mozdev.org> |
---|---|
date | Fri, 12 Apr 2019 12:20:38 -0400 |
parents | 7f366dd3df1f |
children | 57539e5ea2e0 |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Apr 12 12:06:13 2019 -0400 +++ b/mercurial/hg.py Fri Apr 12 12:20:38 2019 -0400 @@ -153,13 +153,13 @@ return False return repo.local() -def openpath(ui, path): +def openpath(ui, path, sendaccept=True): '''open path with open if local, url.open if remote''' pathurl = util.url(path, parsequery=False, parsefragment=False) if pathurl.islocal(): return util.posixfile(pathurl.localpath(), 'rb') else: - return url.open(ui, path) + return url.open(ui, path, sendaccept=sendaccept) # a list of (ui, repo) functions called for wire peer initialization wirepeersetupfuncs = []