Re: Hook to check for a presence of file before committing
From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Tue, 31 Aug 2010 06:11:54 -0500
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.
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.
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.