How do you determine the latest SVN revision number rooted in a directory?

前端 未结 10 1695
北恋
北恋 2020-12-02 15:45

I would like to start tagging my deployed binaries with the latest SVN revision number.

However, because SVN is file-based and not directory/project-based, I need to

10条回答
  •  悲&欢浪女
    2020-12-02 16:22

    This is ridiculous but svn info or svnversion wont take into consideration subdirectories; it's a feature called working 'Mixed Revisions' - I call it torture. I just needed to find the latest 'revision' of the live codebase and the hacked way below worked for me - it might take a while to run:

    repo_root# find ./ | xargs -l svn info  | grep 'Revision: ' | sort
    ...
    Revision: 86
    Revision: 86
    Revision: 89
    Revision: 90
    root@fairware:/home/stage_vancity#
    

提交回复
热议问题