changeset 112:bf6d44054cec

Fix some conditional imports that didn't trigger becuase of the lazy importer
author Michael Tharp <mtharp@rpath.com>
date Mon, 10 Jan 2011 09:56:29 -0500
parents b3aa740a13f8
children edd7c5f97427
files forest.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/forest.py	Wed Jan 05 11:29:08 2011 -0500
+++ b/forest.py	Mon Jan 10 09:56:29 2011 -0500
@@ -264,7 +264,9 @@
 
 try:
     from mercurial import wireproto
-except KeyError:
+    # Force the lazy importer to trigger
+    wireproto.capabilities
+except ImportError:
     pass
 else:
     # hg >= 1.7
@@ -936,6 +938,8 @@
     source = [source]
     try:
         import hgext.fetch as fetch
+        # Force the lazy importer to trigger
+        fetch.cmdtable
     except ImportError:
         raise util.Abort(_("could not import fetch module\n"))
 
@@ -1498,6 +1502,8 @@
 
     try:
         import hgext.fetch
+        # Force the lazy importer to trigger
+        hgext.fetch.cmdtable
     except ImportError:
         return
     try: