[OSM-dev] SVN and individual tag/branch trees
gdt at ir.bbn.com
Fri Apr 24 11:30:04 BST 2009
Frederik Ramm <frederik at remote.org> writes:
> I normally keep the whole SVN tree checked out on all computers I
> use regularly. But with projects gradually introducing their own
> branches/trunk/tag structure, this means that I am amassing a lot of
> stuff. For example, the Osmosis trunk has roughly 1600 files, but
> if you simply check out the whole SVN then you have 8100 Osmosis files
> due to various tags and branches; same, to a lesser degree, elsewhere.
> Is there a way I can tell SVN to "check out everything *except* tags and
> branches"? Ideally in a way that SVN remembers, so that when I
> absent-mindedly type "svn update" I'll not get the whole bunch again?
Basically the way our svn is set up is wrong. There are two standard
svn setups. One is to have trunk/tags/branches (called TTB) at the very
top level. Then the granularity of tagging and branching is the whole
repository. Once you have logically separate things, as we do, this
doesn't make sense.
The other way is to have a set of modules, with every module having a
TTB immediately below it. A number of the things in the OSM repository
are like this, but it is far from uniform.
When you have the per-module TTB, you then can't simply svn co the whole
repository sanely. I manage svn for a large group of projects at BBN,
with about 20 people and 40 modules (each with a TTB). We have a foo-cm
module that only contains svn management scripts and files documenting
rules for the repository, one of which is CHECKOUT-ALL and that
svn co $REPO/module1/trunk module1
svn co $REPO/extern/module2/trunk module2
Instead of doing update, people re-run CHECKOUT-ALL. (CHECKOUT-ALL
actually does update instead of co if you are already checked out.)
This lets you stay on a branch if you have run svn switch. Plus our
CHECKOUT-ALL has tons more complexity about access control and managing
things like linux source that can't be checked out on case-preserving
filesystems; my overall experience is that these situations just keep
getting more complicated, so you really need a script to encapsulate how
One of our rules is that TTB points (which sort of define modules) have
to be in a regular structure. In our case, top-level directories are
modules, except for extern and extern-dist, which are container
directories and otherwise empty, and all subdirs of extern and
extern-dist are modules. We have a rule that from any file in the repo,
you pass exactly one TTB on the way to the root.
I did a checkout and just ignored the wasted disk space, but a possible
define a osm-cm module
create a repository-structure.txt as
that defines where TTB points ought to be
svn mv various bits so that every module has a TTB.
create a CHECKOUT-ALL (/bin/sh) script as
that grabs everything
At least that's what I would do if it were a project at work that I
became responsible for - there may be reasons I don't understand yet
that this isn't appropriate for OSM, but I think it is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 193 bytes
Desc: not available
More information about the dev