Jean-Luc Wasmer wrote:
>Hi,
>
>I checked the SVN book (specially the section about the hooks) but I can't
>find how to do this.
>
>How can I filter committed files thru a code beautifier (like astyle)?
>
right now you can't. if a pre-commit hook script alters the transaction
(meaning: changes the stuff that's being committed) there is no way to
propogate those changes back the the client doing the commit. you can
end up with the client and the server having different ideas of what the
new revision should contain, which breaks things. i think it's a
documented "don't do this" thing at this point. there's some debate
over whether this should be 'fixed', since the idea that doing 'svn
commit' can change the contents of your working copy is kind of scary.
what you could do is have a pre-commit hook that verifies that the code
being checked in conforms to the style guidelines, and if it doesn't
refuse to proceed with the commit. i don't know of anyone who's done
this, but it shouldn't be that hard.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 9 15:29:32 2003