45fan.com - 路饭网

搜索: 您的位置主页 > 网络频道 > 阅读资讯:在跟踪.CS文件中加入版本跟踪信息的步骤

在跟踪.CS文件中加入版本跟踪信息的步骤

2016-08-24 11:23:08 来源:www.45fan.com 【

在跟踪.CS文件中加入版本跟踪信息的步骤

说起来很惭愧,一直以来竟然不知道VSS的这个功能。在 博客园看到一个随笔提到了这个功能,但是描述的不尽详细,我也是询问了一个同事才知道如何正确的配置VSS来实现这个功能,这里面简要的分享给大家,希望能有所帮助。

以前使用CVS知道里面有几个宏参数可以使用,比如:$Header$等等,但并不知道VSS中也可以使用,Google了一下,发现在VSS中可以使用如下:

 

Type this keyword

To add the following

$Archive: $

VSS archive file location

$Author: $

User who last changed the file

$Date: $

Date and time of last check in

$Header: $

Logfile, Revision, Date, Author

$History: $

File history, VSS format

$JustDate: $

Date, without the time addendum.

$Log: $

File history, RCS format

$Logfile: $

Same as Archive

$Modtime: $

Date and time of last modification

$Revision: $

VSS version number

$Workfile: $

File name

$NoKeywords: $

No keyword expansion for all keywords that follow

首先用Admin登录VSS的系统管理界面,选择“Options”:

在跟踪.CS文件中加入版本跟踪信息的步骤550)this.width=550;" border=0>

做如下设置:

在跟踪.CS文件中加入版本跟踪信息的步骤550)this.width=550;" border=0>

接着每个开发者的VSS都必须是VSS6.0d,如果不是,就需要更新!VSS6.0c不可以。

在跟踪.CS文件中加入版本跟踪信息的步骤550)this.width=550;" border=0>

在跟踪.CS文件中加入版本跟踪信息的步骤550)this.width=550;" border=0>

最后需要在每一个.CS文件的最开头加入如下代码:

/*

$Header$
$Author$
$Date$
$Revision$

$History$

*/

这样,每次更改之后就会自动出现如下历史信息(请不要手动去更改):

/*

$Header: /Development/DailyReport/frmMain.cs 13 05-01-14 10:27Uestc95 $

$Author:Uestc95 $

$Date: 05-01-14 10:27 $

$Revision: 13 $

$History: frmMain.cs $

*

* ***************** Version 13 *****************

* User:Uestc95 Date: 05-01-14 Time: 10:27

* Updated in $/Development/DailyReport

*

* ***************** Version 12 *****************

* User:Uestc95 Date: 05-01-14 Time: 10:25

* Updated in $/Development/DailyReport

*

* ***************** Version 11 *****************

* User:Uestc95 Date: 05-01-14 Time: 10:06

* Updated in $/Development/DailyReport

*/

 

 


本文地址:http://www.45fan.com/a/question/66886.html
Tags: 文件 版本 .CS
编辑:路饭网
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部