Changeset View
Changeset View
Standalone View
Standalone View
mercurial/statichttprepo.py
Show All 20 Lines | from . import ( | ||||
manifest, | manifest, | ||||
namespaces, | namespaces, | ||||
pathutil, | pathutil, | ||||
pycompat, | pycompat, | ||||
url, | url, | ||||
util, | util, | ||||
vfs as vfsmod, | vfs as vfsmod, | ||||
) | ) | ||||
from .utils import ( | |||||
urlutil, | |||||
) | |||||
urlerr = util.urlerr | urlerr = util.urlerr | ||||
urlreq = util.urlreq | urlreq = util.urlreq | ||||
class httprangereader(object): | class httprangereader(object): | ||||
def __init__(self, url, opener): | def __init__(self, url, opener): | ||||
# we assume opener has HTTPRangeHandler | # we assume opener has HTTPRangeHandler | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | |||||
): | ): | ||||
supported = localrepo.localrepository._basesupported | supported = localrepo.localrepository._basesupported | ||||
def __init__(self, ui, path): | def __init__(self, ui, path): | ||||
self._url = path | self._url = path | ||||
self.ui = ui | self.ui = ui | ||||
self.root = path | self.root = path | ||||
u = util.url(path.rstrip(b'/') + b"/.hg") | u = urlutil.url(path.rstrip(b'/') + b"/.hg") | ||||
self.path, authinfo = u.authinfo() | self.path, authinfo = u.authinfo() | ||||
vfsclass = build_opener(ui, authinfo) | vfsclass = build_opener(ui, authinfo) | ||||
self.vfs = vfsclass(self.path) | self.vfs = vfsclass(self.path) | ||||
self.cachevfs = vfsclass(self.vfs.join(b'cache')) | self.cachevfs = vfsclass(self.vfs.join(b'cache')) | ||||
self._phasedefaults = [] | self._phasedefaults = [] | ||||
self.names = namespaces.namespaces() | self.names = namespaces.namespaces() | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |