views:

301

answers:

3
+2  Q: 

svn vendor branch

In svn red book in vendor branch chapter, it is proposed to maintain a current/ containing the latest release of 3rd party product, so from the example we end up with:

   repos/vendor/libcomplex/current - contains 1.1
   repos/vendor/libcomplex/1.0
   repos/vendor/libcomplex/1.1

What is it purpose of current/? Why we need initially put a new version to current/ and only after that to copy current/ in a version dedicated directory (e.g. 1.1)?

My guess it's for:

  1. To make different versions svn comparable.
  2. As a side the version are stored in more efficient way in svn repository.

Can I bypass handling of current/ in vendor branch?

Update: I don't intend to patch the vendor code (at least this is a plan). So I'm going to use svn:external to use an appropriate vendor version drop.

+1  A: 

It is needed because using the svn_load_dirs.pl script you destroy contentes of this dir and import everything as new.

No you can't bypass it, as it is necessary and useful.

The point is in deleted dirs and files in the new vendor drop respect to the old one. This script handles this importing the new vendor drop into current and then removing by "automated hand" every no more existant file/dir. Then merge.

svn_load_dirs.pl

Vendor drops that contain more than a few deletes, additions and moves complicate the process of upgrading to each successive version of the third-party data

AlberT
Ok, what you say is that svn_load_dirs.pl requires current/. But I don't want to use it. Actually if I understand the svn book correctly, the script was specially introduced to overcome difficulties which arise from a proposed schema of maintaining vendor drops.Again, I don't intend to reference current/ in my code directly, only version drops (e.g. repos/vendor/libcomplex/1.1) will be used.So, did I really need current/ in this situation?
dimba
you really need a directory for vendor drop import! Name it as you want, of course. But you need a place in which do the import, this place can't be directly the destination dir. If you do not use current, you will not have any correlation between different vendor drops, so it does not make much sense to have them in your svn repo, it would suffice to import the lib into the project using it.
AlberT
+1  A: 

In addition to AlberT's comments, having a dedicated directory (current) also helps to have a constant path reference if your build scripts are goign to reference an area where you should see the latest vendor code ALWAYS.

Critical Skill
A: 

Using a /vendor/current branch makes the /vendor/tag branches pure shadow copies.

I have also used it the current branch for very minor releases in between a vendors major release, where I do not see a need to add a tag.

Nathan Hartley