[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: cvs modules feature missing in subversion

From: Shurik O <shuriko_at_gmail.com>
Date: 2005-01-02 02:25:23 CET

>> why doesnt it support branching and tagging? you just need to update the
>> externals in the tag/branch if needed. that doesnt sound like much work.

Well, not much work when you have a library or two. In our case, with dozens of libraries, the thing
is unmanageable without automation and we need some scripting but then, this solution is just
as easy to implement as the "vendor branches" option.

Let me be more specific.

=== What we have is ===

    /trunk/
      lib/
        libA/
        libB/
      prog1/ # wants to use libA and libB
      prog2/ # wants to use only libA

The purpose is to automatilly checkout only the libraries used by the respective programs.

=== Option 1: svn:external ===

would make it like:

   /trunk/
      lib/
        libA/
        libB/
      prog1/
        lib/ svn:externals=
          svn://svnhost/svnpass/trunk/lib/libA
          svn://svnhost/svnpass/trunk/lib/libB
      prog2/ svn:externals=
          svn://svnhost/svnpass/trunk/lib/libA

So each time we tag we should modify the svn:externals to something like:
          svn://svnhost/svnpass/tags/build1280/lib/libA
          ...
for every library. If there are many libraries, the thing is unmamangeble without automation.

=== Option 2: Copying and merging a la "vendor branches" ==

   /trunk/
      lib/
        libA/
        libB/
      prog1/
        lib/
          libA/ # made by 'svn copy .../trunk/lib/libA'
          libB/ # made by 'svn copy .../trunk/lib/libA'
      prog2/
        lib/
          libA/ # also copied from /trunk/lib/libA

To make this work we need to record the library source in properties or in a file. We also
need to record the last imported revision of each library:

      prog1/
        lib/ module:source=/trunk/lib
          libA/ module:revision=...
          libB/ module:revision=...
      prog2/
        lib/ module:source=/trunk/lib
          lib1/ module:revision=...

Again, we need a script. This time to re-import all or some of the libraries in one shot. Please
note that if you rearrange the repository you will also need to update the module:source properties
to point to the new location but the change will not affect old versions -- they will still work.

Right now I like the "vendor branches" option more because branching and tagging works as it meant
to be -- you just 'svn copy'. It also makes you explicitly "import" changes in the libraries
which some may call an advantage.

I also dislike svn:externals in its current state because it locks you into specific scheme you use
to access SVN. Say you decide to switch from http:// to svn:// scheme or just moved the
repository to a diffent host -- now you are screwed because you cannot checkout versions made
with the old scheme anymore.

It seems that the name "svn:externals" well reflects its function -- to access
EXTERNAL repositories :-) Using svn:externals INTERNALLY is a hack, not even a workaround. Should
it supported intra-repository paths (like /modules/A, without the scheme-host part) and
relative paths (like ../lib1) then it may have worked better; still not perfect.

Marcus Rueckert wrote on 12/31/2004 8:09 AM:
> hi,
>
> On 2004-12-31 01:16:17 -0800, Shurik O wrote:
>
>>svn:externals is out of the question as it wouldn't support branching and
>>tagging.
>
>
> why doesnt it support branching and tagging? you just need to update the
> externals in the tag/branch if needed. that doesnt sound like much work.
>
> darix
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 2 02:26:35 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.