--- a/src/hg-ssh Fri Mar 06 09:22:33 2009 +0000
+++ b/src/hg-ssh Fri Mar 06 12:13:58 2009 +0000
@@ -66,11 +66,14 @@
#logfile = open("/tmp/hg-ssh.%d.txt" % os.getpid(), "w")
#logfile.write("Started: %s\n" % sys.argv)
-if len(sys.argv) != 1:
- fail("hg-ssh must have no arguments (%s)"
+if len(sys.argv) != 2:
+ fail("hg-ssh must have exactly one argument (%s)"
% sys.argv)
+remote_user = sys.argv[1]
+os.environ['REMOTE_USER'] = remote_user
+
rules = ruleset.rules_from_env()
-rules.set(user = getpath(os.environ['REMOTE_USER']))
+rules.set(user = getpath(remote_user))
rules.set(branch = None, file = None)
try_cmd(rules, os.environ.get('SSH_ORIGINAL_COMMAND', '?'))