Current Subversion revision command

后端 未结 10 2118
日久生厌
日久生厌 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:57

    Otherwise for old version, if '--show-item' is not recognize, you can use the following command :

    svn log -r HEAD | grep -o -E "^r[0-9]{1,}" | sed 's/r//g'
    

    Hope it helps.

提交回复
热议问题