Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 8876:e4e22a310b62
extensions: remove now-useless pathdirs() function
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 21 Jun 2009 17:35:04 +0200 |
parents | d0c0013f8713 |
children | 08636e18268f |
comparison
equal
deleted
inserted
replaced
8875:801cacf46e62 | 8876:e4e22a310b62 |
---|---|
116 | 116 |
117 origfn = getattr(container, funcname) | 117 origfn = getattr(container, funcname) |
118 setattr(container, funcname, wrap) | 118 setattr(container, funcname, wrap) |
119 return origfn | 119 return origfn |
120 | 120 |
121 def pathdirs(): | |
122 '''convert sys.path into a list of absolute, existing, unique paths | |
123 (taken from pydoc)''' | |
124 dirs = [] | |
125 normdirs = [] | |
126 for dir in sys.path: | |
127 dir = os.path.abspath(dir or '.') | |
128 normdir = os.path.normcase(dir) | |
129 if normdir not in normdirs and os.path.isdir(dir): | |
130 dirs.append(dir) | |
131 normdirs.append(normdir) | |
132 return dirs | |
133 | |
134 def disabled(): | 121 def disabled(): |
135 '''find disabled extensions from hgext | 122 '''find disabled extensions from hgext |
136 returns a dict of {name: desc}, and the max name length''' | 123 returns a dict of {name: desc}, and the max name length''' |
137 | 124 |
138 import hgext | 125 import hgext |