This way, the company SVN needs to set up interception requests
1 settings must be commented at least 5 characters to submit
logmsg= ' $SVNLOOK log-t "$TXN" $REPOS "| grep "[A-za-z0-9]" | Wc-c ' If ["$LOGMSG"-lt 5];then echo-e "Big Brother you have to write some notes, or you can't submit." 1>&2 exit 1fi# All checks passed, so allow the Commit.exit 0
2 The suffix cannot have a keyword when committing code
Classpath|project|settings|idea|iml|class
# file Filter:we only allow commit. C &&. h files. Filter= ' \. (classpath|project|settings|idea|iml|class) $ ' files=$ ($SVNLOOK changed-t $TXN $REPOS | awk ' {print $} ') # Checkfor F in $f ILESDO # Check file type if echo $f | Grep-eq $FILTER; Then # valid file echo "file $f are a. ClassPath or. Project or. settings or. idea or. iml or. class file" &G T;>/dev/stderr exit 1 Fidoneexit 0
This article is from the "Cubs blog" blog, make sure to keep this source http://9821177.blog.51cto.com/9811177/1752304
About SVN hooks interception settings