Search code examples
javaeclipsesvnsubclipse

How to automatically add SVN commit messages and revision numbering to java file?


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.


Solution

  • 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