[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn:keyword Id as hookscript

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-26 10:56:32 CEST

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

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.