Show More
@@ -43,7 +43,9 b' class nocompress(object):' | |||||
43 | return "" |
|
43 | return "" | |
44 |
|
44 | |||
45 | bundletypes = { |
|
45 | bundletypes = { | |
46 | "": ("", nocompress), |
|
46 | "": ("", nocompress), # only when using unbundle on ssh and old http servers | |
|
47 | # since the unification ssh accepts a header but there | |||
|
48 | # is no capability signaling it. | |||
47 | "HG10UN": ("HG10UN", nocompress), |
|
49 | "HG10UN": ("HG10UN", nocompress), | |
48 | "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), |
|
50 | "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), | |
49 | "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), |
|
51 | "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), |
@@ -147,19 +147,18 b' class httprepository(wireproto.wirerepos' | |||||
147 | # have to stream bundle to a temp file because we do not have |
|
147 | # have to stream bundle to a temp file because we do not have | |
148 | # http 1.1 chunked transfer. |
|
148 | # http 1.1 chunked transfer. | |
149 |
|
149 | |||
150 | type = "" |
|
|||
151 | types = self.capable('unbundle') |
|
150 | types = self.capable('unbundle') | |
152 | # servers older than d1b16a746db6 will send 'unbundle' as a |
|
|||
153 | # boolean capability |
|
|||
154 | try: |
|
151 | try: | |
155 | types = types.split(',') |
|
152 | types = types.split(',') | |
156 | except AttributeError: |
|
153 | except AttributeError: | |
|
154 | # servers older than d1b16a746db6 will send 'unbundle' as a | |||
|
155 | # boolean capability. They only support headerless/uncompressed | |||
|
156 | # bundles. | |||
157 | types = [""] |
|
157 | types = [""] | |
158 |
|
|
158 | for x in types: | |
159 |
f |
|
159 | if x in changegroup.bundletypes: | |
160 | if x in changegroup.bundletypes: |
|
160 | type = x | |
161 |
|
|
161 | break | |
162 | break |
|
|||
163 |
|
162 | |||
164 | tempname = changegroup.writebundle(cg, None, type) |
|
163 | tempname = changegroup.writebundle(cg, None, type) | |
165 | fp = url.httpsendfile(self.ui, tempname, "rb") |
|
164 | fp = url.httpsendfile(self.ui, tempname, "rb") |
General Comments 0
You need to be logged in to leave comments.
Login now