Subversion update externals to a date

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

    Let svn do the recursion for you.

    The tempfile and tee are only here so that you can see the full output:

    SVN_UP_OUTPUT=$(mktemp SVN_UP_OUTPUT.XXXXX)
    svn up -r$REVISION | tee $SVN_UP_OUTPUT
    cat $SVN_UP_OUTPUT | egrep '^Fetching external' | egrep -o "'.*'" | sed -e "s/'//g" | while read DIR;do
        echo $$ svn up -r$REVISION "$DIR"
        svn up -r$REVISION "$DIR"
    done
    rm $SVN_UP_OUTPUT
    

    If you don't care about the output, it can be shortened to this:

    svn up -r$REVISION | egrep '^Fetching external' | egrep -o "'.*'" | sed -e "s/'//g" | while read DIR;do
        svn up -r$REVISION "$DIR"
    done
    

    And of course, in your case:

    REVISION='{20090324}'
    

提交回复
热议问题