validate files checking in to svn

499 Views Asked by At

My team members often check-in Cshasrp project files with CopyLocal option True for assembly references. I would like to prevent this.

What mechanisms available to validate files checked to svn?

2

There are 2 best solutions below

0
On BEST ANSWER

The available mechanism is a pre-commit hook. I think most distributions of SVN come with examples of such hook scripts.

Here's the example hook that is created by by distribution when I create a new repo:

#!/bin/sh

REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null || exit 1

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1

# All checks passed, so allow the commit.
exit 0
0
On

Just another solution

define ignore-list on repository, in properties (of trunk) and include all local files, which must be ignored by Subversion commands.

After it any and every checkout/update will populate changed properties into all working copies