# HG changeset patch # User Paul Crowley # Date 1258115406 0 # Node ID ab5e0e4f5a0cbcd716f716c47a9428e073adf5f3 # Parent 0cd59649772c9c6ae4f744c03998fc8ca5d5248b Use env section of config instead of handling only HGRCPATH diff -r 0cd59649772c -r ab5e0e4f5a0c src/hg-ssh --- a/src/hg-ssh Fri Nov 13 12:26:08 2009 +0000 +++ b/src/hg-ssh Fri Nov 13 12:30:06 2009 +0000 @@ -81,10 +81,8 @@ fail("hg-ssh wrongly called, is authorized_keys corrupt? (%s)" % sys.argv) -# Use a different hgrc for remote pulls - this way you can set -# up access.py for everything at once without affecting local operations - -os.environ['HGRCPATH'] = config.getHgrcPaths() +for k,v in config.getEnv().iteritems(): + os.environ[k] = v os.chdir(config.getReposPath()) diff -r 0cd59649772c -r ab5e0e4f5a0c src/init/dot-mercurial-server --- a/src/init/dot-mercurial-server Fri Nov 13 12:26:08 2009 +0000 +++ b/src/init/dot-mercurial-server Fri Nov 13 12:30:06 2009 +0000 @@ -5,5 +5,10 @@ repos = ~/repos keys = /etc/mercurial-server/keys:~/repos/hgadmin/keys access = /etc/mercurial-server/access.conf:~/repos/hgadmin/access.conf -hgrc = /etc/mercurial-server/remote-hgrc +[env] +# Use a different hgrc for remote pulls - this way you can set +# up access.py for everything at once without affecting local operations + +HGRCPATH = /etc/mercurial-server/remote-hgrc + diff -r 0cd59649772c -r ab5e0e4f5a0c src/mercurialserver/config.py --- a/src/mercurialserver/config.py Fri Nov 13 12:26:08 2009 +0000 +++ b/src/mercurialserver/config.py Fri Nov 13 12:30:06 2009 +0000 @@ -27,15 +27,12 @@ return [os.path.expanduser(p) for p in _getConf()["paths"][name].split(":")] - -def getExePath(): return _getPath("exe") def getReposPath(): return _getPath("repos") def getKeysPaths(): return _getPaths("keys") def getAccessPaths(): return _getPaths("access") -# This goes into an env var, so pass it on verbatim. -def getHgrcPaths(): return _getConf()["paths"]["hgrc"] +def getEnv(): return _getConf()["env"] # Work out where we are, don't use config. def setExePath():