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

Re: Labeling revisions advice sought

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2004-12-29 21:14:22 CET

David Kramer wrote:
> On Wed, 29 Dec 2004, Garrett Rooney wrote:
>
>
>>David Kramer wrote:
>>
>>
>>>I'm trying to figure out how to do that in subversion. The obstacles I
>>>see are:
>>>
>>>- I don't want to do an svn copy every day for one of these builds,
>>>because I think that would make the repository huge. I know it's a
>>>"cheap" copy, but cheap != free, and 50 or 60 cheap copies of thousands of
>>>files for every release can add up. I expect it would slow down access
>>>after a while, too.
>>
>>That's not really true. When you make a copy of a large directory
>>containing hundreds of files you're really not copying all the files.
>>The number of files copied is not meaningful at all in determining how
>>much space will be used in the repository, it's a constant amount for
>>each copy, no matter how many files are involved.
>
>
> One of the things the book says you can do (in "Creating a complex tag")
> is assemble a working copy that has mixed revisions (different files at
> different revisions in the same working copy), and do an svn copy of the
> working copy. If the repository doesn't have a record for every single
> file in the new copy, how can it handle this scenario?

Ok, you didn't say you were creating mixed revision copies. In that
case it's a bit more complex. Let me try to explain.

You need to realize that directories in the Subversion filesystem are
basically collections of pointers to other entries in the filesystem
(either files or other directories), and can refer to previous version
of existing entities. So I can have something where /tags/0.1.0/foo
really refers to revision 10 of /trunk/foo, even though at the time we
created /tags/0.1.0 /trunk/foo was really at revision 15.

To do this, there is some small additional cost as compared to a simple
copy of /trunk to /tags/0.1.0. Normally, if I copy /trunk to /tags/blah
then I need to create a new directory entry for /tags (which holds the
new 'blah' entry in addition to whatever was there) and a new directory
entry for / (which holds tags, trunk, and branches probably). If this
was further down in the repository there would be other directories
created as well, bubbling up from the copy all the way to the root.

If you make a mixed-revision copy, all that same stuff gets copied, plus
new directory entries need to be created for each subdirectory in the
tree that contains mixed revisions. So if I want /tags/0.1.0/foo to be
different from what exists in /trunk/foo when I make the copy I'll add
one more directory entry, for /tags/0.1.0, which will have to record the
fact that it's 'foo' entry points to /trunk/foo from that earlier revision.

So the total cost is proportional to the number of directories that
contain differences, relative to it's parent directory.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 30 14:33:51 2004

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.