Let SVN automatically update the version number in the code comment
Recently, I have been working on code specifications. In the past, plug-ins used to support the automatic update of SVN versions to the comments in the code page header. Now we use Zend studio 7 to develop a PHP project. We need to find an alternative solution to do this. Later, I found a very simple solution in the svn manual:
1. Open the C:/users/[username]/appdata/Roaming/subversion folder.
2. Find the config file and open
3. Locate nable-auto-Props = yes and remove the comment at the beginning of the line;
Add the following fields in the [auto-Props] section:
*.css = svn:keywords=Id
*.php = svn:keywords=Id
*.html = svn:keywords=Id
*.tpl = svn:keywords=Id
*.txt = svn:keywords=Id
*.js = svn:keywords=Id
Save and create a file, add $ ID $ in the file comment, and then add and submit the file to the version library. After the submission is successful, let's look back at this file. When $ ID $ is replaced with something like this:
$Id: UsersController.php 19629 2011-05-09 10:18:16Z zhuwanchun $
The SVN version number can be automatically updated to the comment. Note: This replacement is only valid for newly created files. When you add $ ID $ to a file that has been submitted to the version library, it is not replaced with the current version number.
This article If You Need To reprint, please note: Reprinted from: Blue Hawaii [http://www.coderbolg.com/]
Link: http://www.coderbolg.com/content/140.html