On Jun 26, 2006, at 09:53, Dominique Ronde wrote:
> for some reasons, the development team need a CVS-Header in their
> scripts. Now I set this for the old items with the svn:keyword
> command.
> Is there any possibility to do this with a hook script? With which
> one?
> Can you give me a hint or a Url of a tutorial?
No. You cannot modify a transaction in a pre-commit hook.* If you
require all files (or all .c files, say) to have this keyword set,
then the best you can do is to write a pre-commit script which checks
that each file that's about to be committed does indeed have the
property, and if it does not, to print an error message explaining to
the user that they must add this property before committing. Hooks
are described in the book at http://svnbook.org/ and some example
hooks are created in the hooks directory of every repository.
* In fact you can, but you must not. Subversion will not currently
prevent you from modifying the transaction, but if you do, your
working copies will break and die horrible deaths, so you should not
modify the transaction. Future versions of Subversion may enforce this.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 26 10:58:04 2006