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

RE: Pre-commit hook to verify Perl syntax + build test

From: Lakshman Srilakshmanan <lakshman.srilakshmanan_at_tradingpost.com.au>
Date: 2006-09-18 09:18:32 CEST

Hi Peter,

Not sure if running a build at pre-commit is a good idea.

Reason 1
--------
The checkout from trunk and build could take a while ie (10~15sec). The
developer would have to wait a while before knowing if his changes are
committed.

Reason 2
--------
The source control repository is used to store source code. So rejecting
a commit because trunk does not build (not the fault of the current
committer as his code is not in trunk) actually defeats the fundamental
purpose of a source control repository.

Reason 3
--------
It could take day(s) to fix the problem in trunk. So during this period
no one else can commit any work. I believe the risk of loosing source
code from a developers machine is greater than a trunk that does not
build.

If your concern, is to ensure that code committed into trunk builds,
then you should install a continuous integration build system like
CruiseControl to be triggered post commit and inform the development
team of failure immediately so that the error can be detected and
corrective action taken. This could be a rollback of the change or get
the developer to fix it.

Thanks
Lakshman

> -----Original Message-----
> From: Peter Werner [mailto:l.svn@vasas.no-ip.org]
> Sent: Monday, 18 September 2006 4:38 PM
> To: users@subversion.tigris.org
> Subject: Re: Pre-commit hook to verify Perl syntax + build test
>
> > after checking out the code, you either allow the commit or disallow
> > it.
>
> No, not in the post-commit. You can do it in the pre-commit.
>
>
> BTW, is there anybody here who made a pre-commit check that tries to
> run a build (on trunk if it was changed) and reject the commit if
build
> breaks? (I'm just about to write one.)
>
> The code "checkout" (svnlook cat) part is the similar to perl syntax
> checking.
>
> WP
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 18 10:16:33 2006

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.