您的位置:首页 > 其它

如何在*.CS文件中加入版本跟踪信息?

2005-01-15 18:43 537 查看
说起来很惭愧,一直以来竟然不知道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”:


550)this.width=550;" border=0>

做如下设置:


550)this.width=550;" border=0>

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


550)this.width=550;" border=0>



550)this.width=550;" border=0>

最后需要在每一个.CS文件的最开头加入如下代码:
/*
$Header$
$Author$
$Date$
$Revision$
$History$
*/
这样,每次更改之后就会自动出现如下历史信息(请不要手动去更改):
/*
$Header: /Development/DailyReport/frmMain.cs 13 05-01-14 10:27 Uestc95 $
$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

*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: