diff mercurial/httprepo.py @ 3613:cbf352b9a3cd

Client support for hgweb unbundle with versions.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 02 Nov 2006 14:58:55 +0100
parents a969e81631ce
children fd7a018b7db7
line wrap: on
line diff
--- a/mercurial/httprepo.py
+++ b/mercurial/httprepo.py
@@ -337,8 +337,6 @@ class httprepository(remoterepository):
         # 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 @@ class httprepository(remoterepository):
             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: