What is a Vendor Branch
"A vendor branch is a directory tree in your own version control system that contains information provided by a third-party entity, or vendor" - svn-book
Creating a Vendor Branch
"You create a top-level directory, usually /vendor, to hold the vendor branch(es). Then you import the third party code into a subdirectory of that top-level directory (i.e. /vendor/current). You then copy that subdirectory into your main development branch, usually /trunk. You always make your local changes in the main development branch. With each new release of the code you are tracking you bring it into the vendor branch and merge the changes into /trunk." - svn-book
Its best to use the svn_load_dirs.pl script to do this for you as complicated moves, deletes, adds can be hard to deal with. (Debian users (Ubuntu) who install Subversion through apt-get will not have svn_load_dirs.pl due to licensing issues. A free version called svn-load is available and can be install through apt-get)
Start by creating the vendor directory
svn mkdir http://svn.example.com/repository/project/vendor
Export vendor related code
The syntax is
svn export path/to/repository localdirtocreate
example:
svn export http://svn.thirdparty.com/repository/project/branches/third-party-1.0.x third-party-1.0.x
Use svn_load_dirs.pl or svn-load (same syntax) in the same directory where you exported
The syntax is
svn_load_dirs.pl path/to/base relativedirtobase localexportdir
example:
svn_load_dirs.pl http://svn.example.com/repository/project/vendor current third-party-1.0.x
This results in project/vendor/current which contains third-party-1.0.x
Next, tag the release in the vendor branch
svn copy http://svn.example.com/repository/project/vendor/current http://svn.example.com/repository/project/vendor/third-party-1.0.x
Now, copy the current to the trunk or a location within the trunk (this assumes your doing this for the first time, if not refer to maintaining vendor branches as you will need to merge vendor changes)
svn copy http://svn.example.com/repository/project/vendor/current http://svn.example.com/repository/project/trunk
That's all!