equal
deleted
inserted
replaced
22 namespaces, |
22 namespaces, |
23 scmutil, |
23 scmutil, |
24 store, |
24 store, |
25 url, |
25 url, |
26 util, |
26 util, |
|
27 vfs as vfsmod, |
27 ) |
28 ) |
28 |
29 |
29 urlerr = util.urlerr |
30 urlerr = util.urlerr |
30 urlreq = util.urlreq |
31 urlreq = util.urlreq |
31 |
32 |
84 def build_opener(ui, authinfo): |
85 def build_opener(ui, authinfo): |
85 # urllib cannot handle URLs with embedded user or passwd |
86 # urllib cannot handle URLs with embedded user or passwd |
86 urlopener = url.opener(ui, authinfo) |
87 urlopener = url.opener(ui, authinfo) |
87 urlopener.add_handler(byterange.HTTPRangeHandler()) |
88 urlopener.add_handler(byterange.HTTPRangeHandler()) |
88 |
89 |
89 class statichttpvfs(scmutil.abstractvfs): |
90 class statichttpvfs(vfsmod.abstractvfs): |
90 def __init__(self, base): |
91 def __init__(self, base): |
91 self.base = base |
92 self.base = base |
92 |
93 |
93 def __call__(self, path, mode='r', *args, **kw): |
94 def __call__(self, path, mode='r', *args, **kw): |
94 if mode not in ('r', 'rb'): |
95 if mode not in ('r', 'rb'): |