Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to replace a whole directory tree in Subversion?

Within my Subversion project I have a few directories that contain other open source projects that my code needs. For example ffmpeg, freetype, matrixssl and a few others.

What is the best way to update SVN to hold the the latest version of one of these projects?

Essentially I will be doing the following (using ffmpeg as an example):

1) Rename current ffmpeg folder to ffmpeg.old
2) Download new version of ffmpeg from net
3) Make sure it and my code compile and work fine together
4) Update subversion to now hold the "new" version of ffmpeg
5) Delete ffmpeg.old directory tree
like image 605
KPexEA Avatar asked Oct 10 '08 20:10

KPexEA


2 Answers

You can take a look to svnbook talking about vendor branches. This is exactly what you try to accomplish

You can use svn_load_dirs.pl to replace your manual steps 1-5. svn_load_dirs.pl will also keep track of new, moved or deleted files.

like image 184
Peter Parker Avatar answered Oct 19 '22 04:10

Peter Parker


I've got the same situation with CMake, where I keep the binary win32 release checked into our vendor directory:

branches/
trunk/
vendor/
    cmake/
        cmake-2.6.0/
        cmake-2.6.1/
        cmake-2.6.2/
        ...

I then use svn:externals to refer to the CMake version I'm using. Makes it really easy to test upgrading to new versions, and it is also clear which version of CMake I'm using.

like image 44
JesperE Avatar answered Oct 19 '22 02:10

JesperE