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

Re: Can't check out single file from branch - svn client bug?

From: David Faure <faure_at_kde.org>
Date: 2005-05-06 11:34:40 CEST

On Friday 06 May 2005 02:29, Ben Collins-Sussman wrote:
>
> On May 5, 2005, at 5:47 PM, David Faure wrote:
>
> > Now, I want file.cc and file-in-branch.txt together in this directory.
>
> Sorry, not possible.
>
> A working copy must resemble a tree somewhere in the repository. It's
> okay for parts of the tree to reflect disjoint sections of the
> repository, but you cannot invent arbitrary tree-structures, "merge"
> directory contents together, etc.
>
> That said, there's no reason we couldn't add this ability; it probably
> wouldn't be too much of a stretch. But honestly, nobody's ever asked
> for this feature before. What you're trying to do is rather unusual:
> normally branches tend to have similar structures, so you just switch
> an existing chunk of working-copy structure to reflect some analogous
> structure on the branch. In the rare case, say, where the branch has
> an extra directory that your working copy doesn't, you can always do an
> extra 'svn checkout" of that directory. But you can't checkout a
> single file, hence you're stuck.

I don't think there's anything so "unusual" there. Branches might have
similar directory structure, they don't necessarily have the exact same set of files.

In case you're wondering why I was looking for this feature:
it was perfectly possible with CVS. This is how we handled the development
for a customer who wanted additional features on top of an opensource
project's stable branch. The rules of the project forbid new features in stable
branches, so we had to branch it. But if we branched the whole project, then
we would have to merge manually any bugfix done in the stable branch.
Instead, by only branching the minimum set of files that we needed to change,
we could benefit automatically from any bugfix in the stable branch. We still
have to manually merge fixes made to the few files we branched, but
that's much less work.
So with CVS we simply had a script to "switch" a set of files (and sometimes
directories). Porting this to SVN I realize that SVN doesn't allow me to do that...
I guess I'll branch entire directories for now, but I don't see why future versions
of the svn client shouldn't be able to do this :)

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 6 11:36:37 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.