Getting the subversion repository number into code

前端 未结 6 383
醉梦人生
醉梦人生 2020-11-30 01:24

I\'d like to implement a way of recording the version of a project within code, so that it can be used when testing and to help track bugs. It seems the best version number

6条回答
  •  借酒劲吻你
    2020-11-30 01:31

    You can use the svn:keywords property to enable the Rev keyword.

    You can then use $Rev$ in your code and SVN will expand it automatically when updating to $Rev: 256 $ which can then parse...

    More info on the Subversion manual

提交回复
热议问题