Client support for hgweb unbundle with versions.
authorThomas Arendsen Hein <thomas@intevation.de>
Thu, 02 Nov 2006 14:58:55 +0100
changeset 3613 cbf352b9a3cd
parent 3612 d1b16a746db6
child 3614 fd7a018b7db7
Client support for hgweb unbundle with versions.
mercurial/httprepo.py
--- 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: