changeset 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 9433bdcaa9ae
children 955475d237fc 6652209d104d
files mercurial/changegroup.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Sat Dec 02 03:38:55 2006 -0200
+++ b/mercurial/changegroup.py	Sat Dec 02 16:08:00 2006 -0200
@@ -50,8 +50,8 @@
 bundletypes = {
     "": ("", nocompress),
     "HG10UN": ("HG10UN", nocompress),
-    "HG10BZ": ("HG10", bz2.BZ2Compressor),
-    "HG10GZ": ("HG10GZ", zlib.compressobj),
+    "HG10BZ": ("HG10", lambda: bz2.BZ2Compressor()),
+    "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
 }
 
 def writebundle(cg, filename, bundletype):