##// END OF EJS Templates
When pulling from a non hg repository URL (e.g. http://www.kernel.org/hg)...
When pulling from a non hg repository URL (e.g. http://www.kernel.org/hg) you geta pretty obscure error (zlib: uknown compression type). The attached patch modifies hgweb.py and hg.py to supply and check a 'Content-type: application/hg-0.1' HTTP header for the branches, between and changegroup commands, so that we know it's a proper hg repo before snarfing the input. Comments appreciated!

File last commit:

r262:3db70014 default
r751:0b245ede default
Show More
demandload.py
15 lines | 384 B | text/x-python | PythonLexer
def demandload(scope, modules):
class d:
def __getattr__(self, name):
mod = self.__dict__["mod"]
scope = self.__dict__["scope"]
scope[mod] = __import__(mod, scope, scope, [])
return getattr(scope[mod], name)
for m in modules.split():
dl = d()
dl.mod = m
dl.scope = scope
scope[m] = dl