You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2002/07/21 23:45:02 UTC
vendor branch questions
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
expected.
now we've got what we want, we can do 'svn diff
file:///path/to/repos/vendor/project/0.1
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
them.
-garrett
--
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
Re: vendor branch questions
Posted by Blair Zajac <bl...@orcaware.com>.
Garrett Rooney wrote:
>
> 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.
Use svn/tools/client-side/svn_load_dirs.pl.
It does all of this automatically. It'll load one unversioned
directory into svn. It'll do all the svn mv's (only upon explicit
command by the user), automatically do svn rm's and svn add's to get
the old directory tree in svn to match the new imported directory.
The old directory can either be empty for the first import or
contain an older version of an unversioned directory.
It can also create tags so you can tag each version of the unversioned
directory. If you create a tag, it'll do a recursive diff between
your unversioned directory and the tagged directory to make sure
everything was done properly.
Best,
Blair
--
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: vendor branch "request"
Posted by Féliciano Matias <fe...@free.fr>.
Le lun 22/07/2002 à 01:45, Garrett Rooney a écrit :
> so i've been playing around with recreating cvs's 'vendor branch'
> functionality in svn this weekend, and i've got a few questions.
>
> [...]
>
Excuse my poor english.
Suppose the vendor use Subversion.
In this case, i would like something like this :
my> initial import of vendor Release 0.1 in /vendor/trunk
# vendor reache Release 0.2
vendor> svnadmin dump repos 1000 2000 > Release_0.2.dump
# dump Realese 0.1 to Release 0.2
# I do some hacking in Realese_0.2.dump to remove the initial
version (which is Release 0.1). So Realese_0.2.dump has only delta-tree.
my> svnadmin load -a -s /trunk -d /vendor/trunk repos < Release_0.2.dump
# -a append to existing repository (to deal correctly with
# "Revision-number:" in the dump file.
# -s source directory
# -d destination directory
# => /trunk is substituted with /vendor/trunk
You can think i'm crazy...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: vendor branch questions
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Jul 21, 2002 at 08:49:12PM -0400, Garrett Rooney wrote:
> On Sun, Jul 21, 2002 at 07:46:23PM -0500, Eric Gillespie wrote:
> > Garrett Rooney <ro...@electricjellyfish.net> writes:
> >
> > > i'll write something up for the handbook later this week if nobody
> > > beats me to it.
> >
> > Feel free to plagiarize my document. I can slap a license on it
> > if it makes you feel better, but i don't think that's necessary.
>
> cool... i think the 'crack-heads at Foobar Widgets, Inc' will make a
> lovely addition to the svn handbook ;-)
ok, i just committed a slightly modified version of this to the
handbook in revision 2617. i stuck the branches in /vendor instead of
/imports, since that made more sense to me, but other than that it's
pretty much exactly the same.
let me know if you spot any problems with it.
-garrett
--
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
Re: vendor branch questions
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Jul 21, 2002 at 07:46:23PM -0500, Eric Gillespie wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
>
> > i'll write something up for the handbook later this week if nobody
> > beats me to it.
>
> Feel free to plagiarize my document. I can slap a license on it
> if it makes you feel better, but i don't think that's necessary.
cool... i think the 'crack-heads at Foobar Widgets, Inc' will make a
lovely addition to the svn handbook ;-)
-garrett
--
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
Re: vendor branch questions
Posted by Eric Gillespie <ep...@pretzelnet.org>.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> i'll write something up for the handbook later this week if nobody
> beats me to it.
Feel free to plagiarize my document. I can slap a license on it
if it makes you feel better, but i don't think that's necessary.
--
Eric Gillespie <*> epg@pretzelnet.org
Build a fire for a man, and he'll be warm for a day. Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: vendor branch questions
Posted by Blair Zajac <bl...@orcaware.com>.
Garrett Rooney wrote:
>
> actually, now that i think about it, changing diff/merge would be a
> /huge/ change, and automating the process is probably not feasable,
> since you'd never be able to track renames correctly, so we'll have to
> settle for documentation ;-)
svn_load_dirs.pl lists the files and directories that exist in one
but not both of the svn directory and the unversioned directory and
lets the user match them up and then performs the svn mv's. It's
smart enough to work around the svn limitation where you can only
move the same file or directory once before doing a commit.
Blair
--
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: vendor branch questions
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Jul 21, 2002 at 08:07:27PM -0400, Garrett Rooney wrote:
> > > 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.
> >
> > I'd prefer either of those, too. The process my document outlines
> > isn't really difficult. Once you get used to it it's instinctive,
> > and you just fly right through it.
>
> oh, it doesn't strike me as all that bad, certainly not any worse than
> cvs *grin*, but i still think we could make it easier. or at least we
> could document the procedure somewhere more official ;-)
actually, now that i think about it, changing diff/merge would be a
/huge/ change, and automating the process is probably not feasable,
since you'd never be able to track renames correctly, so we'll have to
settle for documentation ;-)
i'll write something up for the handbook later this week if nobody
beats me to it.
-garrett
--
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
Re: vendor branch questions
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Jul 21, 2002 at 07:03:01PM -0500, Eric Gillespie wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
>
> > so i've been playing around with recreating cvs's 'vendor branch'
> > functionality in svn this weekend, and i've got a few questions.
>
> This will answer at least some of your questions:
>
> http://hackers.progeny.com/~epg/svn-3rdparty.html
cool! perhaps something like this should be in the svn handbook...
> > (side question, is that the correct behavior? it sure confused me...)
>
> Yes. It confused me at first too.
>
> > 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.
>
> I'd prefer either of those, too. The process my document outlines
> isn't really difficult. Once you get used to it it's instinctive,
> and you just fly right through it.
oh, it doesn't strike me as all that bad, certainly not any worse than
cvs *grin*, but i still think we could make it easier. or at least we
could document the procedure somewhere more official ;-)
-garrett
--
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
Re: vendor branch questions
Posted by Eric Gillespie <ep...@pretzelnet.org>.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> so i've been playing around with recreating cvs's 'vendor branch'
> functionality in svn this weekend, and i've got a few questions.
This will answer at least some of your questions:
http://hackers.progeny.com/~epg/svn-3rdparty.html
> (side question, is that the correct behavior? it sure confused me...)
Yes. It confused me at first too.
> 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.
I'd prefer either of those, too. The process my document outlines
isn't really difficult. Once you get used to it it's instinctive,
and you just fly right through it.
--
Eric Gillespie <*> epg@pretzelnet.org
Build a fire for a man, and he'll be warm for a day. Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: vendor branch questions
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Mon, Jul 22, 2002 at 10:55:17AM -0400, Michael Alan Dorman wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
> This seems "more subversiony" to me---I mean, by doing the imports to
> whatever/upstream/version, it seems to me you're basically putting
> them in separate branches---suggesting that there's no relationship.
> What I tried seems to more accurately model the actual state of
> affairs---that these are related revisions along one branch of
> development.
>
> My only complaint, at a practical level, is that I would like svn
> import to do the diffing and commiting for the new upstream version
> from an unversioned subdirectory---but doing it by hand isn't exactly
> hard.
>
> So what have I missed?
nothing, that's essentially the same technique eric was using, and i
agree it makes sense. look at the docs i committed last night and see
if it makes sense to you.
i agree it would be nice to have subversion do the diffing/committing
for you (and blair has a script that does some of the work), but it's
not really a dealbreaker in my opinion.
-garrett
--
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
Re: vendor branch questions
Posted by Michael Alan Dorman <md...@debian.org>.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> [Discussion of method deleted]
I have taken a different approach in my experimenting with subversion
as a tool for tracking my Debian packages.
The idea I had was that you have a single branch for the upstream
(vendor, whatever) source, and you simply tag the upstream releases.
This made merging the changes from the upstream into the trunk very
easy, etc. The _only_ problem I had was that I had to patch to get
the a new upstream version.
So, what I would do (in heavily shorthanded form) is:
svn import whatever/upstream
svn cp whatever/upstream whatever/tags/upstream_1.0
svn cp whatever/upstream whatever/trunk
svn co whatever/trunk
mangle away, etc.
svn commit
svn cp whatever/trunk whatever/tags/myversion_1.0-1
When a new upstream version comes out:
svn co whatever/upstream
apply diffs to bring up to current upstream
svn commit
svn cp whatever/upstream whatever/tags/upstream_1.1
In the trunk:
svn merge -rold:new whatever/upstream
<deal with possibly removed files, conflicts, etc>
svn commit
This seems "more subversiony" to me---I mean, by doing the imports to
whatever/upstream/version, it seems to me you're basically putting
them in separate branches---suggesting that there's no relationship.
What I tried seems to more accurately model the actual state of
affairs---that these are related revisions along one branch of
development.
My only complaint, at a practical level, is that I would like svn
import to do the diffing and commiting for the new upstream version
from an unversioned subdirectory---but doing it by hand isn't exactly
hard.
So what have I missed?
Mike.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org