List Info

Thread: Patch: Get latest revision number




Patch: Get latest revision number
user name
2006-05-22 04:13:32
Hey all,
 ;   I wrote the svn info support for svnAnt and it works as designed from what I know. ; It works as if you ran svn info from the command line and also allows access to the same information accessible from the command-line with the exception of the checksum.  The tests are passing and such but I don't think there has been a new release since the svn info support was added.  That would explain the lack of documentation as well. ; If you need any help, have a suggestion or would like to suggest an enhancement/change let us know.

Take care,

Jeremy

On 5/21/06, Greg Irvine <thalesatm.com">greg.irvinethalesatm.com> wrote:

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.&nbsp;

 


To: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">userssubclipse.tigris.org
Subject: RE: [Subclipse-users] [svn-ant] Patch: Get latest revision number

 

I should clarify that a little.&nbsp; 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.

 

 

Svn info works fine for me.

 

 &nbsp; &nbsp;  &lt;svn>

 &nbsp; &nbsp; &nbsp; &nbsp;  <status path=";." revisionProperty="repository.revision&quot;/>

 &nbsp; &nbsp;  &lt;/svn>

 

You then just pass the property repository.revision around.&nbsp; 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.&nbsp; 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:logicacmg.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dave.irvinglogicacmg.com]
Sent: Friday, 19 May 2006 9:49 PM
To: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">userssubclipse.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&quot; 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&quot; command to

svnant.

It allows you to do this:

 

<svn>;

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

</svn&gt;

<echo message=&quot;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:logicacmg.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dave.irvinglogicacmg.com ]

> Sent: 19 May 2006 11:31

> To: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">userssubclipse.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:logicacmg.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> dave.irvinglogicacmg.com]

> > Sent: 19 May 2006 11:00

> > To: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">userssubclipse.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

> >

> > 

> > 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: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> users-unsubscribesubclipse.tigris.org

> > For additional commands, e-mail: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">users-helpsubclipse.tigris.org

> >

> >

>

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

> To unsubscribe, e-mail: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> users-unsubscribesubclipse.tigris.org

> For additional commands, e-mail: subclipse.tigris.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> users-helpsubclipse.tigris.org

>

>


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )