On Thursday 01 December 2005 21:05, Dmitry Beransky wrote:
> Hi,
>
> I've search the list archive for solutions to this problem, but found
> nothing. If I missed a relevant thread, please simply point me to it.
>
> With modern IDEs that can change a file's coding style at a press of a
> button, shoehorning a programmer's habits into some arbitrary standard made
> no sense to me. So when I set up the development process for our group, I
> made a decision not to enforce any particular style and let my coders
> choose what works best for them. Unfortunately, and very understandably,
> this practice wreaks havoc when it comes to Subversion's diffs. Is there a
> good solution to this? Maybe a way to normalize the code before it's
> committed or diff is run? To make things more complicated we access
> Subversion via TortoiseSVN and IntelliJ IDEA.
>
> Thanks
> Dmitry
Well, I'd suggest doing this:
- agree on a coding style for everyone to obey to (you really have no way
around that, at least I can't see any... sorry)
- get yourself a code formatter like indent(1), configure it so it produces
the coding style you've agreed on and reformat your complete source code
- commit the format changes
- have everyone do an update (svn up)
- punish everyone who doesn't obey to the coding style by letting him/her pay
a meal for the development team ;-)
If you'd use the command line tool, you could write a wrapper script that runs
the code formatter on the files before doing checkins and diffs. I don't know
this IntelliJ IDEA, but maybe if it makes use of the svn command line tool
you could perhaps use such a wrapper ?
C'ya,
Marc
--
Marc Haisenko
Comdasys AG
Rüdesheimer Straße 7
D-80686 München
Tel: +49 (0)89 - 548 43 33 0
Fax: +49 (0)89 - 548 43 33 29
e-mail: haisenko@comdasys.com
http://www.comdasys.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 2 10:16:25 2005