diff -r 31d5c6236f71 -r f597eb3b5aaf src/mercurialserver/config.py --- a/src/mercurialserver/config.py Sun Dec 19 09:49:18 2010 +0000 +++ b/src/mercurialserver/config.py Tue Sep 06 11:16:58 2011 +0100 @@ -20,7 +20,7 @@ def _getPath(name): return os.path.expanduser(_getConf().get("paths", name)) -def _getPaths(name): +def _getPaths(name): return [os.path.expanduser(p) for p in _getConf().get("paths", name).split(":")] @@ -40,6 +40,17 @@ def getEnv(): return _getConf().items("env") +def _getdefault(section, option, default, f = lambda x: x): + conf = _getConf() + if conf.has_option(section, option): + return f(conf.get(section, option)) + else: + return default + +def getAllowedDots(): + return _getdefault("exceptions", "allowdots", [], + lambda s: s.split(":")) + # Work out where we are, don't use config. def initExe(): global _exePath @@ -49,4 +60,3 @@ def getExePath(): return _exePath -