Subversion: enable auto-props

Subversion keywords are u great to auto update the headers in you code files.

Subversion has the ability to substitute keywords—pieces of useful, dynamic information about a versioned file—into the contents of the file itself. Keywords generally provide information about the last modification made to the file. Because this information changes each time the file changes, and more importantly, just after the file changes, it is a hassle for any process except the version control system to keep the data completely up to date. Left to human authors, the information would inevitably grow stale.
http://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html

How to setup Automatic property setting

In ~/.subversion/config, un-comment the following line:
enable-auto-props = yes

And add the following to the [auto-props] section:
*.h = svn:keywords=Author Date Id Rev URL
*.c = svn:keywords=Author Date Id Rev URL
*.py = svn:keywords=Author Date Id Rev URL
*.java = svn:keywords=Author Date Id Rev URL
Makefile = svn:keywords=Author Date Id Rev URL
*.mk = svn:keywords=Author Date Id Rev URL

If you are using TortiseSVN the General page of TortoiseSVN's settings dialog has an edit button to take you there directly.

0 comments: