# HG changeset patch # User Benoit Boissinot # Date 1304166123 -7200 # Node ID aaa9a598940500529bc4757ad47d7c90fcac8e53 # Parent c0e29e10b9ef96bfbe8ec7998124e0535d15e6d6 bundle: more comments about the different header types, remove useless if diff -r c0e29e10b9ef -r aaa9a5989405 mercurial/changegroup.py --- a/mercurial/changegroup.py Sat Apr 30 15:30:51 2011 +0200 +++ b/mercurial/changegroup.py Sat Apr 30 14:22:03 2011 +0200 @@ -43,7 +43,9 @@ return "" bundletypes = { - "": ("", nocompress), + "": ("", nocompress), # only when using unbundle on ssh and old http servers + # since the unification ssh accepts a header but there + # is no capability signaling it. "HG10UN": ("HG10UN", nocompress), "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), diff -r c0e29e10b9ef -r aaa9a5989405 mercurial/httprepo.py --- a/mercurial/httprepo.py Sat Apr 30 15:30:51 2011 +0200 +++ b/mercurial/httprepo.py Sat Apr 30 14:22:03 2011 +0200 @@ -147,19 +147,18 @@ # have to stream bundle to a temp file because we do not have # http 1.1 chunked transfer. - type = "" types = self.capable('unbundle') - # servers older than d1b16a746db6 will send 'unbundle' as a - # boolean capability try: types = types.split(',') except AttributeError: + # servers older than d1b16a746db6 will send 'unbundle' as a + # boolean capability. They only support headerless/uncompressed + # bundles. types = [""] - if types: - for x in types: - if x in changegroup.bundletypes: - type = x - break + for x in types: + if x in changegroup.bundletypes: + type = x + break tempname = changegroup.writebundle(cg, None, type) fp = url.httpsendfile(self.ui, tempname, "rb")