src/mercurialserver/config.py
changeset 212 ab5e0e4f5a0c
parent 211 0cd59649772c
child 213 72e7ba8b41a6
equal deleted inserted replaced
211:0cd59649772c 212:ab5e0e4f5a0c
    25 
    25 
    26 def _getPaths(name): 
    26 def _getPaths(name): 
    27     return [os.path.expanduser(p)
    27     return [os.path.expanduser(p)
    28         for p in _getConf()["paths"][name].split(":")]
    28         for p in _getConf()["paths"][name].split(":")]
    29 
    29 
    30 
       
    31 def getExePath(): return _getPath("exe")
       
    32 def getReposPath(): return _getPath("repos")
    30 def getReposPath(): return _getPath("repos")
    33 
    31 
    34 def getKeysPaths(): return _getPaths("keys")
    32 def getKeysPaths(): return _getPaths("keys")
    35 def getAccessPaths(): return _getPaths("access")
    33 def getAccessPaths(): return _getPaths("access")
    36 
    34 
    37 # This goes into an env var, so pass it on verbatim.
    35 def getEnv(): return _getConf()["env"]
    38 def getHgrcPaths(): return _getConf()["paths"]["hgrc"]
       
    39 
    36 
    40 # Work out where we are, don't use config.
    37 # Work out where we are, don't use config.
    41 def setExePath():
    38 def setExePath():
    42     global _exePath
    39     global _exePath
    43     _exePath = os.path.dirname(os.path.abspath(sys.argv[0]))
    40     _exePath = os.path.dirname(os.path.abspath(sys.argv[0]))