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

Understanding clones and the file system

From: <peter.westlake_at_arm.com>
Date: 2001-08-01 20:56:04 CEST

Before I can think how to use the SVN file system to support modules, I
need to be certain that I understand it properly.

1. Name of the root directory

Does the root directory (node) have a name? Looking at the description of
the Bubble-Up algorithm in
<http://www.tigris.org/files/documents/15/48/svn-design.html>, it would
appear that it does. Checking out everything in the repository gives:

   myproj/
   myproj/B
   myproj/A
   myproj/A/fish
   myproj/A/fish/tuna

Everything is contained in a directory named after the root node, or
perhaps (equivalently) after the repository. Earlier in the same document
it says:

""""For example, suppose you have a repository laid out like this:

   /trunk/paint/Makefile
                canvas.c
                brush.c
         write/Makefile
               document.c
               search.c
"""

So, if this was in a repository called R, and I checked out everything,
would I get R/trunk/...?

2. Branching

Is the following a correct summary?

Suppose you make a clone, like T in the tuna example. If you want to use it
as a branch, check out T like any other directory, make the changes, and
check in. The bubble-up algorithm moves up the node DAG along a path
specified by the working copy. In other words, if F is changed, a new copy
of F is made. Then a new copy of tuna is made, pointing to the new F. Then
a new copy of fish is made, pointing to the new tuna, and a new root is
made, pointing to the new fish. At this point both A and T in the old root
point to the original fish, and we need to decide what values they should
have in the new root. Because the parent of fish in the working copy is T,
the entry for T in the new root points to the new fish. Because A is not on
the path from F to the root of the working copy, the entry for A is
unchanged. In effect, this works by keeping the bubble-up algorithm
blissfully ignorant of the fact that its tree is really a DAG, which
strikes me as particularly elegant in some way I can't quite put my finger
on :-)

Because both the original entry and the clone start out pointing to the
same node, there is little (no?) difference between them. This means there
isn't a notion of "trunk" inherent in the file structure. The only place it
shows up is in the node revision ids. Is that right?

3. Where are clones created?

In the example, the clone entry T appeared in the same node as its original
A, making it a sibling directory of A. Is this the only place T could have
been put, or could it go anywhere that wouldn't create a cycle?

My apologies if the answers are in some header file that I haven't reached
yet.

Peter.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:34 2006

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.