Current Subversion revision command

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

    Nobody mention for Windows world SubWCRev, which, properly used, can substitute needed data into the needed places automagically, if script call SubWCRev in form SubWCRev WC_PATH TPL-FILE READY-FILE

    Sample of my post-commit hook (part of)

    SubWCRev.exe CustomLocations Builder.tpl  z:\Builder.bat
    ...
    call z:\Builder.bat
    

    where my Builder.tpl is

    svn.exe export trunk z:\trunk$WCDATE=%Y%m%d$-r$WCREV$
    

    as result, I have every time bat-file with variable part - name of dir - which corresponds to the metadata of Working Copy

提交回复
热议问题