D5716: statichttprepo: use str to appease Python 3
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sat Jan 26 16:53:49 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6e9bebb65ce7: statichttprepo: use str to appease Python 3 (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5716?vs=13508&id=13516
REVISION DETAIL
https://phab.mercurial-scm.org/D5716
AFFECTED FILES
mercurial/statichttprepo.py
CHANGE DETAILS
diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -19,6 +19,7 @@
manifest,
namespaces,
pathutil,
+ pycompat,
url,
util,
vfs as vfsmod,
@@ -44,12 +45,12 @@
def seek(self, pos):
self.pos = pos
def read(self, bytes=None):
- req = urlreq.request(self.url)
+ req = urlreq.request(pycompat.strurl(self.url))
end = ''
if bytes:
end = self.pos + bytes - 1
if self.pos or end:
- req.add_header('Range', 'bytes=%d-%s' % (self.pos, end))
+ req.add_header(r'Range', r'bytes=%d-%s' % (self.pos, end))
try:
f = self.opener.open(req)
To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list