svnhook - Managing subversion hooks
svnhook init /path/to/repos # enables svnhook for all hooks svnhook init /path/to/repos pre-commit # or just one svnhook list /path/to/repos pre-commit
svnhook init initializes a repository to be managed by SVN::Hook. Currently it doesn't work if you have existing hooks.
The hook is essentially redispatching to what's under the _hook_name directory, for example _pre-commit/ for pre-commit hooks. Files under the directory are invoked in their shell globbing sequence. Unless it's a post- hook, a failed hook terminates svnhook and returns failure to svn. A file ended with "-" is treated as a disabled hook and is not run.
If you look at the hook script itself, you will find a hash table you can edit to provided fine-grained mapping for commits under a certian directroy to also run scripts under the corresponding script directory.
Copyright 2007 Best Practical Solutions, LLC.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Chia-liang Kao <email@example.com<gt>