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

RE: $Log$ keyword alternatives

From: Flanakin Michael C Ctr HQ OSSG/OMR <Michael.Flanakin_at_Gunter.AF.mil>
Date: 2005-09-16 19:04:01 CEST

Well, I'm sure there are a number of ways to do it, but the first one
that comes to mind is to use the <exec> command. There is an <svn>
command as part of NantContrib, but I couldn't get it to work in 5 mins,
so I skipped over it. (NOTE: You'll need "&quot;" before and after your
file name if you have spaces in it)

<exec program="svn"
 commandline="log &quot;http://path/to/repository/file&quot;"
 append="true"
 output="./local/path/to/file" />

Of course, if you are using source code, you may need to output comment
blocks before and after the log (use the <echo> command).

I was thinking the <exec> command could output to a property, but it
doesn't look like it. Oh well. You can use custom code to read/format
the log as needed. You may want to look into that. With Nant, you can do
that with typical .NET file I/O code. Either run the <exec> task and
call a custom function to read the file contents or use that function to
do the log appending, too.

For more information on custom functions with the <script> task, see:
http://nant.sourceforge.net/release/latest/help/tasks/script.html

Michael

-----Original Message-----
From: Bill Arnette [mailto:BillA@signalscape.com]
Sent: Friday, September 16, 2005 9:31 AM
To: Flanakin Michael C Ctr HQ OSSG/OMR; users@subversion.tigris.org
Subject: RE: $Log$ keyword alternatives

 
-----Original Message-----
From: Flanakin Michael C Ctr HQ OSSG/OMR
[mailto:Michael.Flanakin@Gunter.AF.mil]
Sent: Friday, September 16, 2005 10:26 AM
To: Arnette, Bill; users@subversion.tigris.org
Subject: RE: $Log$ keyword alternatives

As the FAQ mentions, I'd use my build script to do this. For instance,
if you're using Ant/Nant, you can append the svn log to the file (with
appropriate comments as needed). A more complicated solution would be to
still use the $Log$ in your files and have the build script search for
and replace it with the svn log.

<bill>
I do in fact use Nant to build my systems; although I am relatively new
to Nant and SVN. Can you give an example of how you append the log to a
source file with Nant?

Thanks,
Bill
</bill>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 16 19:07:06 2005

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