Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有可能在文件中插入文件的修订号。
例如在描述或字符串中。也许有一种预处理器命令。
我更喜欢这种方式:
在你的 C 文件中:
#define SVN_FULL_REV "$Id$" #define SVN_REV "$Revision$"
然后做:
svn propset svn:keywords 'Id Revision' yourfile.c
每次您提交或更新文件时,SVN_REV将是您的修订 ID 和SVN_FULL_REV整个信息字符串,如"$Id: xxx.c 78 2012-09-04 08:42:34Z Author $".
SVN_REV
SVN_FULL_REV
"$Id: xxx.c 78 2012-09-04 08:42:34Z Author $"