Monday 2 March 2009

Vendor branches

Little time ago had a little struggle with vendor branches. Red-book describes this concept pretty good, but command line interface is not my favourite (in this particular situation) when it comes to merging.
Preconditions: Eclipse, Subclipse, svn-load (or svn_load_dirs is equivalent, but i'm using Ubuntu and svn-load can be installed from default repositories)
Here's my example:
  1. update vendor version
    svn update /path/to/vendor
  2. copy updated version to another folder (we'll need to disconnect it from SVN)
    cp -r /path/to/vendor /path/to/vendor_copy
  3. disconnect folder from SVN
    rm -fr `find /path/to/vendor_copy -type d -name .svn`
  4. Send changes to SVN with svn-load:
    svn-load -t tags/vendor_version_2009-02-01 \
    http://svn.mydomain.com/projectX \
    branches/vendor \
    /path/to/vendor_copy
    * I prefer tagging each vendor import
  5. In Eclipse be sure that you've committed all changes and you're working in trunk
  6. Merge new tag and previous one:
  7. in Team Synchronizing perspective double check all changes (this perspective is really useful for merging)
  8. commit!
Hope this helps!

No comments:

Post a Comment