equal
deleted
inserted
replaced
68 |
68 |
69 if len(sys.argv) != 2: |
69 if len(sys.argv) != 2: |
70 fail("hg-ssh must have exactly one argument (%s)" |
70 fail("hg-ssh must have exactly one argument (%s)" |
71 % sys.argv) |
71 % sys.argv) |
72 |
72 |
73 remote_user = sys.argv[1] |
73 ruleset.rules.set(user = sys.argv[1]) |
74 os.environ['REMOTE_USER'] = remote_user |
|
75 |
74 |
76 # Use a different hgrc for remote pulls - this way you can set |
75 # Use a different hgrc for remote pulls - this way you can set |
77 # up access.py for everything at once without affecting local operations |
76 # up access.py for everything at once without affecting local operations |
78 |
77 |
79 os.environ['HGRCPATH'] = paths.getEtcPath() + "/remote-hgrc" |
78 os.environ['HGRCPATH'] = paths.getEtcPath() + "/remote-hgrc" |
84 paths.getEtcPath() + "/access.conf", |
83 paths.getEtcPath() + "/access.conf", |
85 os.getcwd() + "/hgadmin/access.conf"]: |
84 os.getcwd() + "/hgadmin/access.conf"]: |
86 if os.path.isfile(f): |
85 if os.path.isfile(f): |
87 ruleset.rules.readfile(f) |
86 ruleset.rules.readfile(f) |
88 |
87 |
89 ruleset.rules.set(user = getpath(remote_user)) |
|
90 try_cmd(os.environ.get('SSH_ORIGINAL_COMMAND', '?')) |
88 try_cmd(os.environ.get('SSH_ORIGINAL_COMMAND', '?')) |