Use the pre-hook. Pre-commit capture takes 2 arguments:
You need to use svnlook to determine if there are svn: needs-lock files that are not locked.
To determine the paths changed by this commit:
svnlook changed $1 --transaction $2
Scroll the files ( $PATH as a loop element) to 'changed' and define svn: require-lock, and if they are currently locked:
svnlook propget $REPOS-PATH svn:needs-lock $PATH svnlook lock $1 $PATH
Write to stderr and return a nonzero value to abort this commit if necessary.
source share