extensions: check for path existence only when necessary
authorCédric Duval <cedricduval@free.fr>
Sun, 21 Jun 2009 17:18:48 +0200
changeset 8877 08636e18268f
parent 8876 e4e22a310b62
child 8878 231f9d92fd7a
extensions: check for path existence only when necessary
mercurial/extensions.py
--- a/mercurial/extensions.py	Sun Jun 21 17:35:04 2009 +0200
+++ b/mercurial/extensions.py	Sun Jun 21 17:18:48 2009 +0200
@@ -135,8 +135,10 @@
         else:
             name = e
             path = os.path.join(extpath, e, '__init__.py')
+            if not os.path.exists(path):
+                continue
 
-        if name in exts or name == '__init__' or not os.path.exists(path):
+        if name in exts or name == '__init__':
             continue
 
         try: