[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

AW: Automatically tidying up code upon checkin

From: Felix Gilcher <gilcher_at_exozet.com>
Date: 2005-09-15 16:35:28 CEST

Kevin Old <mailto:kevinold@gmail.com> schrieb am Donnerstag, 15. September 2005 16:10:

> Hello everyone,
> I'm a Perl programmer and have several sets of code in Subversion
> repositories and love it! I'm the only person that uses the
> repositories, so I had an idea for adding some cleanup to one of the
> hook scripts.
> Occasionally, I use PerlTidy (perltidy.sourceforg.net) to clean up my
> code, and wondered if first, it was a good idea to investigate havning
> Subversion do this prior to checkin. Second, (if this is a good idea)
> which level of hook script should I implement this?

There are several threads here on this list explaining why you should never manipulate code in a pre-commit-hook script. This is strongly discouraged and may lead to some 'interesting' problems.

You can either check the commit wether it is 'clean' and reject it if not [since you're the only user this is probably overkill] or just use a short script that wraps svn commit and runs PerlTidy prior to the commit command - which is probably what i'd do.

> Any help is appreciated!
> Kevin



Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 15 16:38:00 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.