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

RE: [Subclipse-users] [svn-ant] Patch: Get latest revision number

From: Greg Irvine <greg.irvine_at_thalesatm.com>
Date: 2006-05-22 02:17:47 CEST

And further still, this is the working copy info not the latest in the
repository info. Sorry, I didn't read the original email properly.

 

  _____

From: Greg Irvine [mailto:greg.irvine@thalesatm.com]
Sent: Monday, 22 May 2006 10:08 AM
To: users@subclipse.tigris.org
Subject: RE: [Subclipse-users] [svn-ant] Patch: Get latest revision number

 

I should clarify that a little. I do an <update> before the status which
updates my (cruise control) working copy, and the status/info is obviously a
status of that working copy.

 

  _____

From: Greg Irvine [mailto:greg.irvine@thalesatm.com]
Sent: Monday, 22 May 2006 9:43 AM
To: users@subclipse.tigris.org
Subject: RE: [Subclipse-users] [svn-ant] Patch: Get latest revision number

 

Svn info works fine for me.

 

      <svn>

          <status path="." revisionProperty="repository.revision"/>

      </svn>

 

You then just pass the property repository.revision around. You have to
remember though that ant properties are transient, so if you call say an
update target that does the svn stuff with an <antcall> from another target,
the property isn't visible to the calling target. You have to call you
build script with ant update build rather than ant build and have build call
update, to allow the property to be visible between targets. This is normal
ant behaviour.

 

Hope it helps.

 

Greg.

 

 

 

-----Original Message-----
From: Irving, Dave [mailto:dave.irving@logicacmg.com]
Sent: Friday, 19 May 2006 9:49 PM
To: users@subclipse.tigris.org
Subject: RE: [Subclipse-users] [svn-ant] Patch: Get latest revision number

 

So, the info task didn't work too well, and In the end, I thought it

would be simpler to just have a simple ant task to obtain the latest

revision number of the repository.

 

This allows ant tasks to "do things" with the revision number they are

going to build from (e.g, provide the revision number to other remote

systems).

 

I've attached a patch with introduces a "latestRevision" command to

svnant.

It allows you to do this:

 

<svn>

  <latestRevision target="http://someRepo" propertyName="rev.latest"/>

</svn>

<echo message="Latest revision number is ${rev.latest}"/>

 

(property name is optional - defaults to svn.revison.latest

 

Please let me know what you think (I can create an issue to attach the

patch to if you like?)

 

Cheers,

 

Dave

 

> -----Original Message-----

> From: Irving, Dave [mailto:dave.irving@logicacmg.com]

> Sent: 19 May 2006 11:31

> To: users@subclipse.tigris.org

> Subject: RE: [Subclipse-users] [svn-ant] Get latest revision number

>

> Hmmmm, sorry - I think I was being a fool.

> Looks like there is an "Info" ant task which I missed

> (although, its not in the documentation..)

>

> Dave

>

>

> > -----Original Message-----

> > From: Irving, Dave [mailto:dave.irving@logicacmg.com]

> > Sent: 19 May 2006 11:00

> > To: users@subclipse.tigris.org

> > Subject: [Subclipse-users] [svn-ant] Get latest revision number

> >

> > Hi,

> >

> > I have some ant build scripts which kick off parallel tasks over

> > multiple remote machines (using remoteAnt).

> > Each box updates some stuff from a subversion repository, and then

> > "does its thing".

> >

> > I want to ensure that all boxes update with to the same revision

> > number.

> > The repository is very active - and there can be several

> commits per

> > minute at certain times.

> >

> > So Im going to write an ant task which determines the current head

> > revision number and sets it as an ant property.

> > This can then be provided to each remote box so that they are all

> > updating from the same version.

> >

> > Would such a task likely be accepted by the team as a patch?

> > If so, I can save having to maintain my own loacl svn-ant

> repository

> > :o)

> >

> > All the best,

> >

> > Dave

> >

> >

> > This e-mail and any attachment is for authorised use by the

> intended

> > recipient(s) only. It may contain proprietary material,

> confidential

> > information and/or be subject to legal privilege. It should not be

> > copied, disclosed to, retained or used by, any other party.

> If you are

> > not an intended recipient then please promptly delete this

> e-mail and

> > any attachment and all copies and inform the sender. Thank you.

> >

> >

> ---------------------------------------------------------------------

> > To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org

> > For additional commands, e-mail: users-help@subclipse.tigris.org

> >

> >

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org

> For additional commands, e-mail: users-help@subclipse.tigris.org

>

>
Received on Mon May 22 02:18:47 2006

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

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