Commits

Michael Tharp committed bf6d440

Fix some conditional imports that didn't trigger becuase of the lazy importer

Comments (0)

Files changed (1)

 
 try:
     from mercurial import wireproto
-except KeyError:
+    # Force the lazy importer to trigger
+    wireproto.capabilities
+except ImportError:
     pass
 else:
     # hg >= 1.7
     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"))
 
 
     try:
         import hgext.fetch
+        # Force the lazy importer to trigger
+        hgext.fetch.cmdtable
     except ImportError:
         return
     try: