diff --git a/contrib/hg-ssh b/contrib/hg-ssh --- a/contrib/hg-ssh +++ b/contrib/hg-ssh @@ -64,7 +64,7 @@ def main(): if readonly: cmd += [ '--config', - 'hooks.prechangegroup.hg-ssh=python:__main__.rejectpush', + 'hooks.pretxnopen.hg-ssh=python:__main__.rejectpush', '--config', 'hooks.prepushkey.hg-ssh=python:__main__.rejectpush' ] diff --git a/tests/test-ssh.t b/tests/test-ssh.t --- a/tests/test-ssh.t +++ b/tests/test-ssh.t @@ -398,7 +398,7 @@ Test hg-ssh in read-only mode: pushing to ssh://user@dummy/*/remote (glob) searching for changes remote: Permission denied - remote: abort: prechangegroup.hg-ssh hook failed + remote: abort: pretxnopen.hg-ssh hook failed remote: Permission denied remote: pushkey-abort: prepushkey.hg-ssh hook failed updating 6c0482d977a3 to public failed!