Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Team/CVS Commit event trigger
Team/CVS Commit event trigger [message #154055] Tue, 13 April 2004 18:44 Go to next message
Eclipse UserFriend
Originally posted by: michaelneale.yahoo.com

I stuffed up the other day:
I committed something into CVS thinking that I had run the ant
build/test/check targets (as I always do, and are meant to) but of course
I hadn't. The change was committed and broke the build on the integration
server. Woops.

What I want to know is: Is there a way to put some sort of event in so
that you can't commit a change to anything unless you have run a certain
ant target? or some other routine task? I know if I used any to commit
things, then it would be fine, but I want to be able to selectively do it
to a single file using eclipse.

Any ideas? help !!
Re: Team/CVS Commit event trigger [message #154080 is a reply to message #154055] Tue, 13 April 2004 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hallorant.yahoo.com

"Enoch Root" <michaelneale@yahoo.com> wrote in message
news:c5hqgo$mcg$1@eclipse.org...
> What I want to know is: Is there a way to put some sort of event in so
> that you can't commit a change to anything unless you have run a certain
> ant target? or some other routine task? I know if I used any to commit
> things, then it would be fine, but I want to be able to selectively do it
> to a single file using eclipse.

Well, you could tell Eclipse to run the Ant target upon modification of
resources within the project -- but I suspect this would be too often to
meet your needs. Look in the Ant settings for trigger on resource
modification.

That said, you could consider configuring your CVS server (i.e., CVSROOT) to
invoke a pre-checkin script that fails if the server can't run through your
"smoke test." then the check-in would fail. I don't think this is too hard
to do under CVS. If these tests are long-running then this is probably not
a good solution either. This is also impossible if you don't control the
CVS server very well (i.e., sourceforge or some such).

If your an eclipse Hacker you could write a simple view plugin that
display's a message "REMINDER: run tests before check-in" and configure it
withing the XML to be part of the CVS repository default perspective -- when
you switch to that perspective you would note the reminder (this assumed you
do a sychronize with repository rather than just a commit from the Java
perspective)

Good luck!
Re: Team/CVS Commit event trigger [message #154095 is a reply to message #154080] Tue, 13 April 2004 21:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michaelneale.yahoo.com

Thanks for the quick reply, see below for comments:
(see below)
Tim Halloran wrote:

> "Enoch Root" <michaelneale@yahoo.com> wrote in message
> news:c5hqgo$mcg$1@eclipse.org...
> > What I want to know is: Is there a way to put some sort of event in so
> > that you can't commit a change to anything unless you have run a certain
> > ant target? or some other routine task? I know if I used any to commit
> > things, then it would be fine, but I want to be able to selectively do it
> > to a single file using eclipse.

> Well, you could tell Eclipse to run the Ant target upon modification of
> resources within the project -- but I suspect this would be too often to
> meet your needs. Look in the Ant settings for trigger on resource
> modification.

How do I do this? I would like to try, but it does sound a little over the
top.

> That said, you could consider configuring your CVS server (i.e., CVSROOT) to
> invoke a pre-checkin script that fails if the server can't run through your
> "smoke test." then the check-in would fail. I don't think this is too hard
> to do under CVS. If these tests are long-running then this is probably not
> a good solution either. This is also impossible if you don't control the
> CVS server very well (i.e., sourceforge or some such).

We use cruise control, so it kind of does this. I am thinking more of a
client side thing - so it doesn't even let you bother with the server
until it has passed... also, I don't have any control over the server.

> If your an eclipse Hacker you could write a simple view plugin that
> display's a message "REMINDER: run tests before check-in" and configure it
> withing the XML to be part of the CVS repository default perspective -- when
> you switch to that perspective you would note the reminder (this assumed you
> do a sychronize with repository rather than just a commit from the Java
> perspective)

I am not an eclipse hacker, but interested in becoming one! What about
modifying the CVS plug in itself to be able to call things before a
commit? how hard would that be?

> Good luck!
Re: Team/CVS Commit event trigger [message #154126 is a reply to message #154095] Wed, 14 April 2004 04:12 Go to previous message
Eclipse UserFriend
Enoch Root wrote:

>> Well, you could tell Eclipse to run the Ant target upon modification
>> of resources within the project -- but I suspect this would be too
>> often to meet your needs. Look in the Ant settings for trigger on
>> resource modification.
>
> How do I do this? I would like to try, but it does sound a little
> over the top.

Go to the preferences of your project and add a new Ant builder.

Take care, Ilja
Previous Topic:Marker: Some marker appear not deterministic in problems view
Next Topic:[Q]: Refactoring: How to get errors/warnings on unused or unreferenced public/protected methods/fiel
Goto Forum:
  


Current Time: Tue Jun 03 10:13:02 EDT 2025

Powered by FUDForum. Page generated in 0.02996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top