Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My requirement is simple. At the beginning of each file there should be a block comment like this:

/*
 * This file was last modified by {username} at {date} and has revision number {revisionnumber}
 */

I want to populate the {username}, {date} and {revisionnumber} with the appropriate content from SVN.

How can I achieve this with NetBeans and Subversion? I have searched a lot but I can't find exactly what I need.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
283 views
Welcome To Ask or Share your Answers For Others

1 Answer

I looked at this question and got some useful information. It is not exactly duplicate because I am working with NetBeans but the idea is the same. This is my header:

/*
 * $LastChangedDate$
 * $LastChangedRevision$
 */

Then I go to Team > Subversion > Svn properties and add svn:keywords as property name and LastChangedDate LastChangedRevision as property value.

And when I commit from NetBeans it looks like this:

/*
 * $LastChangedDate: 2012-02-13 17:38:57 +0200 (Пн, 13 II 2012) $
 * $LastChangedRevision: 27 $
 */

Thanks all for the support! I will accept my answer because other answers do not include the NetBeans information. Nevertheless I give +1 to the other answers.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...