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

Re: version label in my source

From: Helge Jensen <jensen_at_slog.dk>
Date: 2004-04-27 07:09:43 CEST

John Peacock wrote:

> Stewart Johnson wrote:
>
>> I'd like to be able to put tag information in my source files, but I'm
>> not sure how to do it. If I create a tag for my project:
>>
>> $ svn copy http://example.com/repos/myproj/trunk \
>> http://example.com/repos/myproj/tags/REL-0.1.0 \
>> -m "Release 0.1.0: snapshot build for the subsystem test team"
>>
>> ... then is it possible to get that release information into my source
>> files? ie: I'd like "REL-0.1.0" to appear in the header of my sources,

I currently use a program that parses the output of "svnversion", "svn
info" and "svn status" to generate a source-file that includes this
information, and then include that source in my program.

If you use "make", this is pretty easy, and with MSDEV, you can put it
as a pre-build step.

Running the svn programs are "local" and doesn't take long, but you
probably do not want to update the output file if it hasn't changed.

My program is written in C#, and generates C# code, email me if wish to
get any of it. (It has a nice GUI, that allows you to Drag&Drop
assemblies with embedded information onto it, and see all the info
stored in the assembly)

-- 
Helge
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 27 07:10:52 2004

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

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