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

Subversion vendor branch revisited...

From: Doyle, Patrick <WPD_at_dtccom.com>
Date: 2006-02-02 15:21:18 CET

I had a bizarre thought yesterday and thought I would pass it on to the list
for comments...

I have a situation where I am integrating 3rd party code, which is supplied
via a Subversion repostory, with my own code, which is controlled by a
separate (local) repository.

Sometimes, I would like to feed patches back to the developer for the 3rd
party code, sometimes my changes are purely local ones.

I definitely want a copy of the vendor's code on my server so that I can
still work, even if the external network goes down, (or worse, the vendor
goes out of business).

On the one hand, this sounds like a classic "vendor branch" scenario where I
would periodically pull down the latest release of the subversion controleld
vendor code, strip out the .svn directories (or, more accurately, do an "svn
export" of the 3rd party code) and use "svn_load_dirs.pl" to merge the
changes into my code.

Then I started thinking (now, you all _know_ I'm in trouble). Since the
source of the 3rd party distribution is Subversion controlled, I ought to be
able to invent a new "svn_load_subvsersion_dirs.py" script (since I
read/write Python better than I read/write Perl) that does effectively the
same thing as "svn_load_dirs.pl", but with the added feature of knowing
exactly what files were added, deleted, renamed, etc... as well as
maintaining subversion properties.

Then I started thinking, "Gee that would take me a while to get right,
especially given how little time I have to play with such things. What if I
tried something different..."

Here's where it starts to get bizarre...

Suppose I modified Subversion such that the name of the ".svn" directory was
specified by an environment variable (such as SVN_META_DIR) instead of being
hard coded in the client code. Then I could do things like:

$ SVN_META_DIR=.svn.vendor svn co svn://vendor/path/to/repos

to check out the vendor tree, and

$ svn import ...

to check it into my subversion server.

Later, to find out what I've modified locally I could do:

$ svn status

To find out what I've changed relative to the vendor's code, I could do:

$ SVN_META_DIR=.svn.vendor svn status

What do folks think of this?

--wpd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 2 15:18:19 2006

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

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