changeset 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 d1b16a746db6
children fd7a018b7db7
files mercurial/httprepo.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: