comparison mercurial/hgweb/hgweb_mod.py @ 3612:d1b16a746db6

Add allowed bundle types as argument to hgweb unbundle capability. Arguments to capabilities were added before the 0.9.1 release, so there are no compatibility issues. Mercurial 0.9 didn't support http push. Using HG10GZ, HG10BZ and HG10UN has the advantage that new bundle types can be added later and the client doesn't have to try sending them first and reacting on errors sent by the server.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 02 Nov 2006 14:39:08 +0100
parents 967f1d00f521
children eb0b4a2d70a9
comparison
equal deleted inserted replaced
3611:967f1d00f521 3612:d1b16a746db6
1019 untrusted=False) 1019 untrusted=False)
1020 req.write(staticfile(static, fname, req) 1020 req.write(staticfile(static, fname, req)
1021 or self.t("error", error="%r not found" % fname)) 1021 or self.t("error", error="%r not found" % fname))
1022 1022
1023 def do_capabilities(self, req): 1023 def do_capabilities(self, req):
1024 caps = ['unbundle', 'lookup', 'changegroupsubset', 'standardbundle'] 1024 caps = ['lookup', 'changegroupsubset']
1025 if self.configbool('server', 'uncompressed'): 1025 if self.configbool('server', 'uncompressed'):
1026 caps.append('stream=%d' % self.repo.revlogversion) 1026 caps.append('stream=%d' % self.repo.revlogversion)
1027 # XXX: make configurable and/or share code with do_unbundle:
1028 unbundleversions = ['HG10GZ', 'HG10BZ', 'HG10UN']
1029 if unbundleversions:
1030 caps.append('unbundle=%s' % ','.join(unbundleversions))
1027 resp = ' '.join(caps) 1031 resp = ' '.join(caps)
1028 req.httphdr("application/mercurial-0.1", length=len(resp)) 1032 req.httphdr("application/mercurial-0.1", length=len(resp))
1029 req.write(resp) 1033 req.write(resp)
1030 1034
1031 def check_perm(self, req, op, default): 1035 def check_perm(self, req, op, default):