--- a/hg-ssh Tue Apr 22 09:46:29 2008 +0100
+++ b/hg-ssh Tue Apr 22 10:13:39 2008 +0100
@@ -51,12 +51,12 @@
def get_cmd(rules, remoteuser, cmd):
if cmd.startswith('hg -R ') and cmd.endswith(' serve --stdio'):
repo = getpath(cmd[6:-14])
- if rules.allow("read", user=remoteuser, repo=repo, file=None):
+ if rules.allow("read", user=remoteuser, repo=repo, branch=None, file=None):
os.environ["HG_REPO_PATH"] = repo
return ['-R', repo, 'serve', '--stdio']
elif cmd.startswith('hg init '):
repo = getpath(cmd[8:])
- if rules.allow("init", user=remoteuser, repo=repo, file=None):
+ if rules.allow("init", user=remoteuser, repo=repo, branch=None, file=None):
os.environ["HG_REPO_PATH"] = repo
return ['init', repo]
fail("Illegal command %r" % cmd)