Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/changegroup.py @ 3762:b9d3e12da485
changegroup.py: delay the loading of the bz2 and zlib modules
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 02 Dec 2006 16:08:00 -0200 |
parents | 0d810798acb1 |
children | 8c24b6fd5866 |
comparison
equal
deleted
inserted
replaced
3761:9433bdcaa9ae | 3762:b9d3e12da485 |
---|---|
48 return "" | 48 return "" |
49 | 49 |
50 bundletypes = { | 50 bundletypes = { |
51 "": ("", nocompress), | 51 "": ("", nocompress), |
52 "HG10UN": ("HG10UN", nocompress), | 52 "HG10UN": ("HG10UN", nocompress), |
53 "HG10BZ": ("HG10", bz2.BZ2Compressor), | 53 "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()), |
54 "HG10GZ": ("HG10GZ", zlib.compressobj), | 54 "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()), |
55 } | 55 } |
56 | 56 |
57 def writebundle(cg, filename, bundletype): | 57 def writebundle(cg, filename, bundletype): |
58 """Write a bundle file and return its filename. | 58 """Write a bundle file and return its filename. |
59 | 59 |