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

Re: svnant and the HEAD version #

From: Nick Chalko <nick_at_chalko.com>
Date: 2004-07-15 00:40:40 CEST

You could write your own task using this command underneath

$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/incubator/depot/trunk/common
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 22917
Node Kind: directory
Schedule: normal
Last Changed Author: mmay
Last Changed Rev: 22758
Last Changed Date: 2004-07-09 13:12:38 -0700 (Fri, 09 Jul 2004)

and then parse for the Revision line.

but I would store the value in a safer attribute like
org.tigris.subversion.Revision.

Cédric Chabanois wrote:

> No there is no way for now.
> This would be possible to get the revision number when you checkout or
> update something.
>
> I will see what I can do ...
>
> Cédric
>
>> Is there any way for svnant to retrieve the HEAD revision number into
>> an ant property (or
>> something similar)? My team wants to append distribution files with
>> the Subversion repository
>> revision number appended (ie. webapp_2323.war). The intent is to
>> make obvious the revision used
>> to build a given distributable.
>>
>> One solution that comes to mind is very ugly:
>> - use the subversion post-commit hook script the write out and commit
>> a java properties file
>> containing something like: build.version=2323
>> - use ant to load this file into ant properties and use build.version
>> in the distributable
>> filenames
>>
>> This smells bad to me for a few reasons. There will be two commits
>> for every user commit. The
>> hacked together nature of the solution does not give me confidence in
>> the build process. It seems
>> like there should be a way to retrieve this kind of basic repository
>> data through svnant... such a
>> deficiency makes me wonder if I'm not overlooking something obvious!
>>
>> Thanks!
>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> New and Improved Yahoo! Mail - Send 10MB messages!
>> http://promotions.yahoo.com/new_mail
>> ---------------------------------------------------------------------
>> 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 Thu Jul 15 08:40:40 2004

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.