You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Old <ke...@gmail.com> on 2005/09/15 14:09:33 UTC

Automatically tidying up code upon checkin

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?

Any help is appreciated!
Kevin
-- 
Kevin Old
kevinold@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Automatically tidying up code upon checkin

Posted by Steve Williams <st...@kromestudios.com>.
Kevin Old wrote:
> 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?

Hook scripts can not and should not change any files, because then the 
version of the file on the server would be different than the version on 
the client.  There have been some long discussions on this list about 
this sort of feature in the past.

The best solution at the moment is to run PerlTidy on your client before 
doing the commit.  Personally I would want to do that anyway so I could 
check the tidied code still worked before I committed it to the repository.

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.