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

vendor branch questions

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-07-22 01:45:02 CEST

so i've been playing around with recreating cvs's 'vendor branch'
functionality in svn this weekend, and i've got a few questions.

the general idea i had was to maintain a top level 'vendor' directory
in the repository, then 'svn import' each release of the project i
want to track into /vendor/project/, so at first you would import
version 0.1, then you'd do a 'svn cp' to copy it into /trunk where you
add your own modifications. then when a new version comes out, you
import it into /vendor/project/ alongside 0.1, then do a 'svn merge'
to merge the changes into what you have in trunk.

this all sounds well and good, but it doesn't work, since
/vendor/project/0.1 and /vendor/project/0.2 aren't related to each
other, so 'svn diff' and 'svn merge' think that the files in them are
completely unrelated, and you end up with diffs that show that the
files are completely different, even if they are identical.

(side question, is that the correct behavior? it sure confused me...)

so now we see that to get the behaviour i want, i have to do something
like this.

'svn import' 0.1 into /vendor/project/0.1, then 'svn cp' it into
/trunk/project. then when 0.2 comes out, do a 'svn cp
vendor/project/0.1 vendor/project/0.2' and then untar the release into
a checked out version of 0.2, add any new files and delete anything
that isn't supposed to be there anymore, and then finally commit.
then i can do a 'svn merge' into trunk/project and it will work as

now we've got what we want, we can do 'svn diff
file:///path/to/repos/vendor/project/0.2' and get the difference
between 0.1 and 0.2, or with trunk/project and see what our local
changes are, and all is well and good.

the problem is that it's a pain in the ass to do it. what i'd like
would be for 'svn import' to be able to import from an unversioned
directory into my working copy, handling all the 'svn add' and 'svn
delete' stuff that's needed. or, i'd like 'svn diff' to be able to
show the diff between two paths that have no common ancestry, so i
could simply 'svn import' the new release onto my vendor branch and
have 'merge' and 'diff' work correctly.

any comments? how are we expecting users to do this kind of thing? i
know that there are several large projects (i'm thinking of the
various *BSD projects specifically) that make extensive use of vendor
branches, and if we can make it easy that would be a big help for


garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 22 01:45:30 2002

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.