You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Frank Kemmer <fr...@gmail.com> on 2007/06/13 16:13:00 UTC

Checking for an already published revision

Since nobody is interested in answering my harder questions, here a
simple one (I hope ... :)

What is the best way to let an ivy:publish fail if the revision given
as an attribute to the publish does already exist in the repository.

I would have loved an attribute for ivy:publish like
failOnRevisionExists="true".

Since I didn't find such a flag and couldn't configure the repository
resolver to reject this publication, I am wondering if I should use
findrevision and then check if the resolution is successful. If so, I
would fail with a message like: "Revisision already exists in
repository".

Does anybody have some better suggestions?

Thanx for any help in advance.

RE: Checking for an already published revision

Posted by Gilles Scokart <gs...@gmail.com>.
Your requirements make sense.  Unfortunately, I see only one alternative to
the solution you propose.  I hope you will like it.  You can get the source
from svn, make the modification and attach a patch to a jira issue.
Don't hesitate to ask for help if you want to do that.  I'm sure you will
receive a quicker response than to your previous question.

Gilles

> -----Original Message-----
> From: Frank Kemmer [mailto:frank.kemmer@gmail.com]
> Sent: mercredi 13 juin 2007 16:13
> To: ivy-user@incubator.apache.org
> Subject: Checking for an already published revision
> 
> Since nobody is interested in answering my harder questions, here a
> simple one (I hope ... :)
> 
> What is the best way to let an ivy:publish fail if the revision given
> as an attribute to the publish does already exist in the repository.
> 
> I would have loved an attribute for ivy:publish like
> failOnRevisionExists="true".
> 
> Since I didn't find such a flag and couldn't configure the repository
> resolver to reject this publication, I am wondering if I should use
> findrevision and then check if the resolution is successful. If so, I
> would fail with a message like: "Revisision already exists in
> repository".
> 
> Does anybody have some better suggestions?
> 
> Thanx for any help in advance.