--- a/src/hg-ssh Sat Dec 19 16:31:31 2009 +0000
+++ b/src/hg-ssh Sat Dec 19 16:32:17 2009 +0000
@@ -45,7 +45,7 @@
def getrepo(op, repo):
# First canonicalise, then check the string, then the rules
# and finally the filesystem.
- repo = repo.rstrip("/")
+ repo = repo.strip().rstrip("/")
if len(repo) == 0:
fail("path to repository seems to be empty")
if repo.startswith("/"):
@@ -59,6 +59,9 @@
config.initExe()
+for k,v in config.getEnv():
+ os.environ[k.upper()] = v
+
if len(sys.argv) == 3 and sys.argv[1] == "--base64":
ruleset.rules.set(user = base64.b64decode(sys.argv[2]))
elif len(sys.argv) == 2:
@@ -67,9 +70,6 @@
fail("hg-ssh wrongly called, is authorized_keys corrupt? (%s)"
% sys.argv)
-for k,v in config.getEnv():
- os.environ[k.upper()] = v
-
os.chdir(config.getReposPath())
for f in config.getAccessPaths():