Client support for hgweb unbundle with versions.
--- a/mercurial/httprepo.py Thu Nov 02 14:39:08 2006 +0100
+++ b/mercurial/httprepo.py Thu Nov 02 14:58:55 2006 +0100
@@ -337,8 +337,6 @@
# have to stream bundle to a temp file because we do not have
# http 1.1 chunked transfer.
- use_compress = 'standardbundle' in self.capabilities
-
# XXX duplication from commands.py
class nocompress(object):
def compress(self, x):
@@ -346,7 +344,13 @@
def flush(self):
return ""
- if use_compress:
+ unbundleversions = self.capable('unbundle')
+ try:
+ unbundleversions = unbundleversions.split(',')
+ except AttributeError:
+ unbundleversions = [""]
+
+ if "HG10GZ" in unbundleversions:
header = "HG10GZ"
z = zlib.compressobj()
else: