changeset 8877:08636e18268f

extensions: check for path existence only when necessary
author Cédric Duval <cedricduval@free.fr>
date Sun, 21 Jun 2009 17:18:48 +0200
parents e4e22a310b62
children 231f9d92fd7a
files mercurial/extensions.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: