On Aug 20, 2006, at 13:24, Adiseshan, Muthugopalakrishnan wrote:
> I would like to change the contents of a specific
>
> file (in the modified part of the file), as part of pre-commit
> hook.
>
>
>
> Is there any way to do it
Yes, you can do it, but no, you absolutely should not do it, because
it will break everything. See the big red warning box at the bottom
of this section:
http://svnbook.red-bean.com/en/1.2/
svn.reposadmin.create.html#svn.reposadmin.create.hooks
> Warning
>
> Do not attempt to modify the transaction using hook scripts. A
> common example of this would be to automatically set properties
> such as svn:eol-style or svn:mime-type during the commit. While
> this might seem like a good idea, it causes problems. The main
> problem is that the client does not know about the change made by
> the hook script, and there is no way to inform the client that it
> is out-of-date. This inconsistency can lead to surprising and
> unexpected behavior.
>
> Instead of attempting to modify the transaction, it is much better
> to check the transaction in the pre-commit hook and reject the
> commit if it does not meet the desired requirements.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 21 16:13:15 2006