We recently decided to make all projects run a particular post-commit hook script; Rather than remembering to add a link to the script each time we created a project, USVN was modified to do this for us.
How I did this was simple:
In
library/USVN/Project.php there is (ln ~52, createProjectSVN()):
Code:
if ($tmp_path === $path . DIRECTORY_SEPARATOR) {
@mkdir($path, 0700, true);
USVN_SVNUtils::createSVN($path);
if ($create_dir) {
USVN_SVNUtils::createStandardDirectories($path);
}
} else {
Right after the end of the $create_dir IF statement, I added a call to symlink(), like so:
Code:
if ($tmp_path === $path . DIRECTORY_SEPARATOR) {
@mkdir($path, 0700, true);
USVN_SVNUtils::createSVN($path);
if ($create_dir) {
USVN_SVNUtils::createStandardDirectories($path);
}
symlink('/var/svn/post-commit-hook.sh', $path.'/hooks/post-commit');
} else {
Note that for the time being, you will also have to edit removeDirectory() in DirectoryUtils due to
a bug.