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

Re: Newbie question: Svn and Unison

From: David Ripton <dripton_at_ripton.net>
Date: 2005-05-14 06:37:52 CEST

On 2005.05.13 21:30:36 +0000, Michael Hipp wrote:
> David Ripton wrote:
> >If you put all the directories in one repository, and are able to
> >checkout the whole thing, then you don't even need the script. Just one
> >"svn update" in the parent directory, which will recurse by default.
>
> Thanks. Keeping it all in one big repository would certainly be simpler.
> But wouldn't I then lose the ability to do proper branches, tags, releases
> within a project folder?

No, you can structure projects within a repository however you want.
When in doubt, I would lean toward fewer repositories rather than more.
This saves on administrative overhead, makes it easier to reuse code
between projects or move code around to a new project, and is faster
because you only have to setup one network connection rather than
several of them to do a full update.

The svn book shows two main ways to organize a multi-project repository.
IMO this is the more obvious way:

/project1/trunk
/project1/branches/branch1
/project1/branches/branch2
/project1/tags/tag1
/project1/tags/tag2
/project2/trunk
/project2/branches/branch3
/project2/branches/branch4
/project2/tags/tag3
/project2/tags/tag4

And this is the better way:

/trunk/project1
/trunk/project2
/branches/project1/branch1
/branches/project1/branch2
/branches/project2/branch3
/branches/project2/branch4
/tags/project1/tag1
/tags/project1/tag2
/tags/project2/tag3
/tags/project2/tag4

The reason the second way is nicer IMO is that you can keep a single
working copy of trunk or your favorite branch checked out on each
machine all the time, and do a single "svn update" per box to fetch
all the changes to all your projects. Also, this layout makes it easier
to move code between projects, since you can do the work in a single
normal-sized working copy.

Basically, svn is only good at dealing with working copies that are
proper subtrees, so you want the groups of files that get worked on
together to be in proper subtrees. I find that I need project1 and
project2 in the same working copy way more often than I need branch1 and
branch2 in the same working copy. If your projects are totally
independent then maybe this won't hold for you.

-- 
David Ripton    dripton@ripton.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 14 06:39:54 2005

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.