views:

243

answers:

1

I'm working on an Apache Wicket project in Eclipse with Maven2 -- my SCM is Subversion. I've got Subclipse set up which I use to commit changes to the repository.

I've seen several projects with nice headers containing the current revision number and at the bottom of the java source file there's a list of all the changes that have been committed to the file including the comments that were passed.

Is there any way of achieving this sort of behaviour automatically? At work I'm using MKS which does this automatically but I am yet to figure out how to achieve this with SVN and Eclipse.

+4  A: 

You are asking about "Keyword Substitution", and it is indeed possible. This page will explain everything you need to know: http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html

FYI not everybody thinks this is a good idea. E.g.: http://wordaligned.org/articles/keyword-substitution-just-say-no

dkamins
Thanks dkamins. That's exactly what I was looking for and I appreciate the second link
John
I agree. Commit information is meta-information and should not go in the actual file.
Thorbjørn Ravn Andersen