You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alberto Avanzi <Al...@sophia.inria.fr> on 2006/05/25 14:21:07 UTC
Automatic syntax reformatting hook
Hi,
in all-day-development our team uses svn. We wrapped the svn executable
(on the client side) with a shell script which automatically calls a
syntax reformatting
tool before each commit and update. This allow us to insure that all the
repository files
share the same syntax and we completely avoid conflicts due to
differences in code formatting.
Our experience showed that this way is much easier than to convince
developers
to conform to the same syntax rules :-)
Now I'm wondering if there is an alternative way to do that, consisting
in moving the
reformatting tool on the server side and using a hook. The main problem
we have with
our current solution is that it doesn't allow to use graphical clients
for svn because these
clients normally don't directly call the "svn" executable (preventing
wrapping).
But pre-commit hook can't modify the transition and start-commit hook
don't allow
(if I'm right) to retrieve the committed file name.
Someone has an idea ?
Thanks in advance for help.
Alberto Avanzi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Automatic syntax reformatting hook
Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Thu, 25 May 2006 16:21:07 +0200, Alberto Avanzi
<Al...@sophia.inria.fr> wrote:
>But pre-commit hook can't modify the transition and start-commit hook
>don't allow
>(if I'm right) to retrieve the committed file name.
>
>Someone has an idea ?
If you really must do it, then use a post-commit hook.
svnlook changed -rXXXX
should do it.
Greg
--
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org