views:

29

answers:

1

I've been using subversion to store my Visual Studio Solutions. Up until now I've always stored the entire solution in a single trunk folder, with a single tags folder to store revisions of the entire solution.

\trunk\
\tags\1.0\
\tags\1.0\
\tags\3.0\

My VS solutions so far have usually only contained one project, and if they contain more then one project it's still not much more than one. When I completed a "offical" release I have been creating tags of the entire solution regardless of which project actually changed.

But now that I'm working on a solution that contains many projects I think I should start keeping track of the version of each project separately. What is the preferred way to setup the folders in a SVN repository to do this? I've seen examples like this.

\project1\trunk\
\project1\tags\1.0\
\project1\tags\2.0\
\project1\tags\3.0\
\project2\trunk\
\project2\tags\1.1\
\project1\tags\2.2\

Where do I put the solution (*.sln) file? I don't really like this setup as I don't see any easy way to export the latest working solution and all the projects with out ending up with \trunk\ folders in my working copy, or exporting each project individually which seems like a pain.

A: 

You'd do something like this:

// Solution file and all projects here in trunk.
\world-domination\trunk\
\world-domination\trunk\volcano-lair          // <-- This is a sub-project.
\world-domination\trunk\airborne-virus        // <-- This is a sub-project.
\world-domination\trunk\orbital-space-station // <-- This is a sub-project.
// ...

// Tags are named after the sub-project...
\world-domination\tags\volcano-lair-1.7.4
\world-domination\tags\airborne-virus-3.6
\world-domination\tags\orbital-space-station-5.2

// ... or the whole system.
\world-domination\tags\1.0-release

// But in either case they are snapshots of trunk.
John Feminella
So is `\world-domination\tags\volcano-lair-1.7.4` a snapshot of `\world-domination\trunk\volcano-lair\ ` or the entire `\world-domination\trunk\ `?
Eric Anastas
It's the entire \world-domination\trunk. Don't take snapshots of anything less than \trunk, because Subversion doesn't make it easy to tell what the snapshot is actually _of_. A tag is essentially just a pointer to a specific state, so in modern versions of `svn` this takes up much, much less space than copying the files themselves.
John Feminella