Let SVN automatically update the version number in the code comment

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.