tags:

views:

238

answers:

3

Hello,

I'm using ant with svntask to update a repository before I build an application. At the end of the build, an email goes out with the results of the build. It would be very helpful to include the svn revision number and message in that email, so if the build breaks, we know which revision to review.

I am currently displaying only the revision number:

<status path="${main.site}" revisionProperty="sqlUpdateStatus.revision"/>

But I don't know how (or if there is a way) to get that revision's message (the message put in by the commiter). Do you guys know how to do that?

+1  A: 

It's not exactly an answer to your question, but have you considered using a Continuous Integration (CI) tool, such as Hudson?

Hudson comes out of the box with SVN and ANT support and the ability to email errors when the build fails.

Mads Hansen
+1  A: 

I don't think there's a built in way to get the commit message, but you can pull it manually out of svn with a command like this:

svnlook log -r X /path/to/repo

This will return the log message for the revision X for the repository at /path/to/repo. You could wrap this up in ant's exec task to preform it from ant...

+1 for Hudson - very simple to deploy and set up

rjohnston
+1 for actually answering the question
Mads Hansen
A: 
<svn username="username" password="password">
 <log url="svn://url"/>
</svn>
FoxyBOA
sorry FoxyBOA, still here? :)I will probably go with rjohnston's suggestion if I don't find this out. And while Hudson appears to be a good suggestion, I don't have time to implement it just now. Maybe for the future.