Subversion update externals to a date

前端 未结 12 1401
無奈伤痛
無奈伤痛 2020-12-12 21:04

I\'m working on a large, established project under SVN control. Many parts of the code base are being checked out as externals, but are being actively worked on by other peo

12条回答
  •  臣服心动
    2020-12-12 21:33

    I still haven't got a perfect solution, but this one comes close:

    svn propget svn:externals | sed -e 's/ .*$//g' | xargs svn up -r'{20090324}'
    

    This works in my case because there's no recursive externals, and all externals are defined with no spaces in the directory or a revision number, so the regular expression can easily chop off the trailing repository path.

    I'm sure there's better regex that will solve the problem generically, though.

    Edit: Actually the more I think about this, the more problems I see. The biggest of which is that it's using the svn:externals from the current version, rather than the svn:externals of the version at the specified date. This is even more complex than I first thought.

提交回复
热议问题