On Aug 30, 2010, at 19:46, Tech Geek wrote:

> The code that we are trying to commit is generated by an IDE - a software 
> development tool. The particular file (project.xml) is usually an optional 
> file that is up to the developers/user to generate. However we would like to 
> enforce a policy where all the developers before they commit their changes 
> make sure that the project.xml is also generated and then only a successful 
> commit occurs.

It sounds like you are saying the following:

 * There is a file project.xml that developers should have in their working 
copy.
 * This file does not exist in the repository because it will be different for 
each developer.
 * There is probably even an svn:ignore definition for project.xml.
 * There might be a pre-commit hook blocking anyone from committing their 
project.xml.
 * You want to enforce that the developer cannot commit unless they have this 
project.xml in their working copy, though it will never be sent to the 
repository.

If I understand correctly, then you cannot create such an enforcement using 
Subversion's server-side hook scripts. Information about the state of the 
user's working copy simply is not available to the hook script for it to make a 
decision based on it.

If you can force your users to use a particular Subversion client, you may be 
able to program something specific to that client. For example, TortoiseSVN's 
client-side hook mechanism, or if you were using the command-line client, a 
wrapper script around it that performs this check.

Reply via email to