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

Re: Why are branches real directories?!?!?!

From: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2003-04-02 10:28:25 CEST

Hi

On Tue, Apr 01, 2003 at 10:16:52PM -0500, Jean-Luc Wasmer wrote:
[snip]
> The svn guide says:
> "Subversion's branches exist a normal filesystem directories in the
> repository, not in some extra dimension."

> But isn't the extra dimension the coolest thing about a version
> control tool?

> Having the same file system tree when switching between revisions or
> branches avoids changing paths in make files, configuration files,
> etc...
[snip]

The paths in make files etc. don't have to change. e.g.:

Check out the trunk
$ svn checkout file:///path/to/repos/trunk project

Now you have a working copy in the "project" directory. Inside project
you have a Makefile referring to various paths etc.

Let's say you want to make a change on some branch that was created in
the repository at /branches/version-1.0, you can do this (in the
"project" directory):

$ svn switch file:///path/to/repos/branches/version-1.0

Now in project you have a Makefile referring to exactly the same paths
as before. i.e. the Makefile refers to paths in your local filesystem,
and these haven't changed (unless you've moved stuff around on the
branch and not in /trunk or vice versa, of course.)

> Also (not a big deal, but still), the names of the branches may
> interfere with future directories.
[snip]

Generally, Subversion repositories are laid out something like this:

/trunk/Makefile
/trunk/src/blah.c
/branches/branch1/Makefile
/branches/branch1/src/blah.c
/tags/tag1/Makefile
/tags/tag1/src/blah.c

so the fact that there's a branch called "branch1" does not stop you
from making a directory called "branch1" under /trunk.

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 2 10:29:37 2003

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.