0

I need to check the content of files with extension *.csproj as part of Pre-Commit Hook and validate them

How can I get the list of files that will be checked-in as part of the transaction?

What steps should I do to check the content of the files?

I am using the windows version of Sub version server. I will be using Perl Script getting the file list.

Maanu
  • 5,093
  • 11
  • 59
  • 82

2 Answers2

1

You need to use an svn administration tool called svnlook to get the files changed.

Look at svnlook cat - http://svnbook.red-bean.com/en/1.5/svn.ref.svnlook.c.cat.html and svnlook changed - http://svnbook.red-bean.com/en/1.5/svn.ref.svnlook.c.changed.html

manojlds
  • 290,304
  • 63
  • 469
  • 417
0

Read the SVN book to get a handle on commit hooks.

Insert / modify the pre-commit hook to reference your script. The file list will be provided by subversion as a command line parameter.

Have your script decide which files from the command line need to be validated. Have your script then run validation on each one of the files. If you find a file is invalid, then have your script exit with a error exit code (usually non-zero)

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138