changeset 2994:94def4db6cd4

merge.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 22 Aug 2006 07:32:54 -0700
parents 985594e891b8 (diff) 4e815ee377fd (current diff)
children 799811087044
files
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/packagescan.py	Tue Aug 22 10:20:21 2006 +0200
+++ b/mercurial/packagescan.py	Tue Aug 22 07:32:54 2006 -0700
@@ -25,6 +25,7 @@
     """ fake demandload function that collects the required modules
         foo            import foo
         foo bar        import foo, bar
+        foo@bar        import foo as bar
         foo.bar        import foo.bar
         foo:bar        from foo import bar
         foo:bar,quux   from foo import bar, quux
@@ -38,6 +39,8 @@
         except:
             module = m
             fromlist = []
+        if '@' in module:
+            module, as_ = module.split('@')
         mod = __import__(module, scope, scope, fromlist)
         if fromlist == []:
             # mod is only the top package, but we need all packages