Include SVN revision number in source code

后端 未结 5 951
生来不讨喜
生来不讨喜 2020-12-09 10:23

My requirement is simple. At the beginning of each file there should be a block comment like this:

/*
 * This file was last modified by {username} at {date}          


        
5条回答
  •  粉色の甜心
    2020-12-09 10:55

    You can do this with The SubWCRev Program.

    SubWCRev is Windows console program which can be used to read the status of a Subversion working copy and optionally perform keyword substitution in a template file. This is often used as part of the build process as a means of incorporating working copy information into the object you are building. Typically it might be used to include the revision number in an “About” box.

    This is typically done during the build process.

    If you use Linux, you can find a Linux binary here. If you wish, you could also write your own using the output of svn log.

提交回复
热议问题