mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
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.
This commit is contained in:
parent
444ab6d2a3
commit
944124b40d
@ -1021,9 +1021,13 @@ class hgweb(object):
|
||||
or self.t("error", error="%r not found" % fname))
|
||||
|
||||
def do_capabilities(self, req):
|
||||
caps = ['unbundle', 'lookup', 'changegroupsubset', 'standardbundle']
|
||||
caps = ['lookup', 'changegroupsubset']
|
||||
if self.configbool('server', 'uncompressed'):
|
||||
caps.append('stream=%d' % self.repo.revlogversion)
|
||||
# XXX: make configurable and/or share code with do_unbundle:
|
||||
unbundleversions = ['HG10GZ', 'HG10BZ', 'HG10UN']
|
||||
if unbundleversions:
|
||||
caps.append('unbundle=%s' % ','.join(unbundleversions))
|
||||
resp = ' '.join(caps)
|
||||
req.httphdr("application/mercurial-0.1", length=len(resp))
|
||||
req.write(resp)
|
||||
|
Loading…
Reference in New Issue
Block a user