Subversion update externals to a date

前端 未结 12 1402
無奈伤痛
無奈伤痛 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:18

    This is the best solution to the problem I found to date (it's a tricky problem - subversions devs should fix it in the core). This example deals with mplayer in particular but you should easily see the logic.

    ; fetch the rev I want without including the externals
    svn checkout -r "$REV" --ignore-externals \
        svn://svn.mplayerhq.hu/mplayer/trunk
    
    ; grab the date of that rev from the svn info output
    DATE=`svn info trunk|sed -n '/^Last Changed Date/s/.*: \(.*\) (.*/\1/p'`
    
    ; fetch the externals using that date
    svn checkout -r "{$DATE}" \
            svn://svn.mplayerhq.hu/ffmpeg/trunk/libavutil \
            svn://svn.mplayerhq.hu/ffmpeg/trunk/libavformat \
            svn://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec \
            svn://svn.mplayerhq.hu/ffmpeg/trunk/libpostproc
    

提交回复
热议问题