Current Subversion revision command

后端 未结 10 2121
日久生厌
日久生厌 2021-01-31 13:05

Is there a Subversion command to show the current revision number?

After svn checkout I want to start a script and need the revision number in a variable.

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 13:53

    1. First of all svn status has the revision number, you can read it from there.

    2. Also, each file that you store in SVN can store the revision number in itself -- add the $Rev$ keyword to your file and run propset: svn propset svn:keywords "Revision" file

    3. Finally, the revision number is also in .svn/entries file, fourth line

    Now each time you checkout that file, it will have the revision in itself.

提交回复
热议问题