Well, changing the content of the commit using a hook in SVN is a very
very bad idea.

As you can read in the SVN Book:
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html

>  Warning
>While hook scripts can do almost anything, there is one dimension in which 
>hook script
>authors should show restraint: do not modify a commit transaction using hook 
>scripts. While
>it might be tempting to use hook scripts to automatically correct errors, 
>shortcomings, or
>policy violations present in the files being committed, doing so can cause 
>problems.
>Subversion keeps client-side caches of certain bits of repository data, and if 
>you change a
>commit transaction in this way, those caches become indetectably stale. This
>inconsistency can lead to surprising and unexpected behavior. Instead of 
>modifying the
>transaction, you should simply validate the transaction in the pre-commit hook 
>and reject
>the commit if it does not meet the desired requirements.

You can run uncrustify and check if it changed anything, and reject
the commit if it did, but you should not run it on the hook to change
the committed content, otherwise very bad conflicts can happen (I
learned this the hard way.)

Cheers,

Eduardo.

On Thu, Aug 5, 2010 at 5:13 AM, David Seikel <onef...@gmail.com> wrote:
> On Thu, 5 Aug 2010 09:03:15 +0200 (CEST) Vincent Torri
> <vto...@univ-evry.fr> wrote:
>
>> On Thu, 5 Aug 2010, Massimiliano wrote:
>>
>> > We could use post-commit hook.
>>
>> In that case, will the mail commit be sent after the hook ?
>
> Post and pre commit hooks are what make things like commit mails
> possible, it's not a built in part of SVN.  So we can do whatever we
> like in whatever order we like.  Same thing goes for most other systems.
>
> I suspect that having this done as part of the commit process is what
> was in mind all along.
>
> --
> A big old stinking pile of genius that no one wants
> coz there are too many silver coated monkeys in the world.
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to