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

Incremental Checkout Issue (feature request) - related to issue #695

From: Andrew Sinclair <subversion_at_asinclair.com>
Date: 2003-04-10 05:12:21 CEST

Suppose you have a repository with a lot of projects in it:

    repos/
       trunk/
          projA/
          projB/
          projC/
          ...
       branches/
          projA
          ...

Now suppose you only want to check out projA files but you want to a
local copy of the trunk and branches. You can start by downloading the
repos directory nonrecursively

# svn co -N http://svn.foo.com/repos wc

Then checkout the trunk files

# cd wc
# svn co http://svn.foo.com/repos/trunk/projA trunk/projA
# svn co http://svn.foo.com/repos/branches/projA branches/projA
# svn co http://svn.foo.com/repos/tags/projA tags/projA

Now you have a working copy file structure of

    wc/
       trunk/
          projA/
       branches/
          projA/
       tags
          projA/
      
Which looks like the repository but it isn't. Say you want to generate
an offshoot project from projA so you try and make a copy in trunk

# cd trunk
# svn copy projA projNew
svn: Path is not a working copy directory
svn: '' is not a working copy

This doesn't work because trunk isn't recognized as a working copy since
you didn't explicitly check it out. But since you were in the wc
directory, which is logically the parent of 'trunk', svn should have
recognized this and made trunk part of the working copy as well when you
checked out trunk/projA. Instead what you have to do is:

# svn co -N http://svn.foo.com/repos wc
# cd wc
# svn co -N http://svn.foo.com/repos/trunk
# cd trunk
# svn co http://svn.foo.com/repos/trunk/projA
# cd ..
# svn co -N http://svn.foo.com/repos/branches
# cd branches
# svn co http://svn.foo.com/repos/branches/projA
# cd ..
# svn co -N http://svn.foo.com/repos/tags
# cd tags
# svn co http://svn.foo.com/repos/tags/projA

which is just plain annoying.

Really, Subversion should keep track of incremental checkouts and allow
you to add parts without having to do each part individually. Or
alternatively, an option should be added to the checkout command that
allows you to specify the root of the working directory. Something like:

# svn co -from http://svn.foo.com/repos
http://svn.foo.com/repos/trunk/projA wc

which would then checkout projA and put it into a working copy with the
full structure starting at repos, i.e.

    wc/
       trunk/
          projA/

where all three directories are valid working copies.

Is this a Good, Bad, or Stupid request?

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 10 05:09:59 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.