comparison mercurial/hgweb/protocol.py @ 6152:c050548307a4

hgweb: use bundletypes from mercurial.changegroup
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 21 Feb 2008 15:00:25 +0100
parents 948a41e77902
children ef1c5a3b653d
comparison
equal deleted inserted replaced
6151:8bc4fe428103 6152:c050548307a4
99 req.write(z.compress(chunk)) 99 req.write(z.compress(chunk))
100 100
101 req.write(z.flush()) 101 req.write(z.flush())
102 102
103 def capabilities(web, req): 103 def capabilities(web, req):
104 caps = ['lookup', 'changegroupsubset'] 104 resp = ' '.join(web.capabilities())
105 if web.configbool('server', 'uncompressed'):
106 caps.append('stream=%d' % web.repo.changelog.version)
107 # XXX: make configurable and/or share code with do_unbundle:
108 unbundleversions = ['HG10GZ', 'HG10BZ', 'HG10UN']
109 if unbundleversions:
110 caps.append('unbundle=%s' % ','.join(unbundleversions))
111 resp = ' '.join(caps)
112 req.respond(HTTP_OK, HGTYPE, length=len(resp)) 105 req.respond(HTTP_OK, HGTYPE, length=len(resp))
113 req.write(resp) 106 req.write(resp)
114 107
115 def unbundle(web, req): 108 def unbundle(web, req):
116 def bail(response, headers={}): 109 def bail(response, headers={}):