This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SVN for src (was Re: Binutils 2.18 prep)


On Thu, Mar 22, 2007 at 11:00:18AM -0400, Daniel Jacobowitz wrote:
> On Thu, Mar 22, 2007 at 10:06:41AM +0000, Andrew STUBBS wrote:
> > We create an Subversion directory containing all the top-level files (configure 
> > etc.), but with all the subdirectories (gas, gdb etc.) present but *empty*. We 
> > then provide a script that does 'svn switch' on each directory required for a 
> > given 'module'. This is the inverse of the svn://gcc.gnu.org/svn/gcc/emptydir 
> > idea (see http://gcc.gnu.org/wiki/SvnSetup "Optimize disk usage").
> 
> You know, I think we can do this even without having to butcher the
> layout of the repository.  Check out a directory containing just the
> script, and have it use "svn switch -N" at the end to pick up the top
> level files.
> 
> I'm going to experiment.  I have a handy repository to work with :-)
> (We import CVS snapshots into svn.)

Here's what I've got so far.  These are all just my observations, so
my assertions about how Subversion works may be bogus.

Suppose we leave the repository layout exactly the same as it is now.

Check out the trunk using "svn co -N" for non-recursive.  You will get
only the trunk - no subdirectories.  Unlike in CVS they will never
spontaneously appear after this point; "svn up" will only create new
directories when it updates through a revision in the repository that
created the directory.  Otherwise, it appears to assume that the
directory is deliberately missing if it is not mentioned in
.svn/entries.  However, an explicit "svn up gdb" in this case will
work!

So, we can put a script in the top level to check out a module.  If
you check out the repository URL you'll get all of src; if you check
out using -N and run the script with appropriate argument, you'll get
only binutils.  Or only GDB, et cetera.  We'll probably need to
maintain a list of subdirectories for anything where directories are
omitted from some modules; that's top level, gdb and gdb/testsuite/
(for Insight), and cgen.  It'll be a hassle but not a huge hassle.

Not everything is rosy.  "svn cp . $repo/branches/new-branch" will
copy the omitted directories, which is peculiar, so we would either
need people branching to get a hypothetical svn which didn't do that
or use a script to create branches.  But it's much less messy than
using externals would be.

Any thoughts?  Is this really workable?

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]