diff -r 7374d0147875 -r 584df0f2e5c7 src/mercurialserver/config.py --- a/src/mercurialserver/config.py Fri Nov 13 14:33:52 2009 +0000 +++ b/src/mercurialserver/config.py Fri Nov 13 14:42:46 2009 +0000 @@ -2,14 +2,14 @@ import sys import os.path -import mercurial.config +import ConfigParser globalconfig = None def _getConf(): global globalconfig if globalconfig is None: - globalconfig = mercurial.config.config() + globalconfig = ConfigParser.RawConfigParser() globalconfig.read(os.path.expanduser("~/.mercurial-server")) return globalconfig @@ -21,11 +21,11 @@ return False def _getPath(name): - return os.path.expanduser(_getConf()["paths"][name]) + return os.path.expanduser(_getConf().get("paths", name)) def _getPaths(name): return [os.path.expanduser(p) - for p in _getConf()["paths"][name].split(":")] + for p in _getConf().get("paths", name).split(":")] def getReposPath(): return _getPath("repos") def getAuthorizedKeysPath(): return _getPath("authorized_keys") @@ -33,7 +33,7 @@ def getKeysPaths(): return _getPaths("keys") def getAccessPaths(): return _getPaths("access") -def getEnv(): return _getConf()["env"] +def getEnv(): return _getConf().items("env") # Work out where we are, don't use config. def setExePath():