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

Re: newbie checkout question

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-04-06 18:24:51 CEST

On Apr 6, 2006, at 18:09, David L wrote:

>>> In CVS when I checkout foo/bar/src, I get a the whole path foo/
>>> bar/ src in my working
>>> directory. With subversion, when I checkout file:///repopath/
>>> trunk/ foo/bar/src, I get just
>>> the directory src in my working directory. Then if I checkout
>>> file:///repopath/trunk/blah/src,
>>> I get a message:
>>>
>>> svn: 'src' is already a working copy for a different URL
>>>
>>> How do I get the CVS behavior for checkout that checks out the
>>> whole path?
>>
>> mkdir -p foo/bar/src
>> svn co file:///repopath/trunk/foo/bar/src foo/bar/src
>
> Thanks Ryan, that works. However, I didn't get quite the behavior
> that I'd hoped for. I'm trying to change a script that checked out
> some select paths from a CVS archive to one that checks out from
> SVN. Having to create the directories and then check out to those
> directories is a minor inconvenience. But a bigger problem is that
> the directories foo and bar are not really checked out. In CVS,
> foo and bar would have CVS directories and I could do things like:
>
> cvs co foo/bar/src
> cvs co foo/bar/include
> #intentionally don't check out the enormous foo/bar/reallybig
> directory
> cat foo/bar/src/example.cc | sed 's/blah/bla/' > foo/bar/src/
> example.cc
> cat foo/bar/include/example.h | sed 's/blah/bla/' > foo/bar/include/
> example.h
> cvs dif foo
>
> and get a listing of differences that I had made in foo/bar/src and
> foo/bar/include.

Ah. I've never really used CVS so I was unaware. Then you'll have to
do as you already found out:

> The steps I appear to have to take in svn to get the equivalent of
> this cvs line:
>
> cvs co common/software/utilities/foo/bar/include common/software/
> utilities/foo/bar/src
>
> are the following 7 svn checkout lines:
>
> svn co -N file:///tmp/svnrepos/trunk/common
> svn co -N file:///tmp/svnrepos/trunk/common/software common/software
> svn co -N file:///tmp/svnrepos/trunk/common/software/utilities \
> common/software/utilities
> svn co -N file:///tmp/svnrepos/trunk/common/software/utilities/foo \
> common/software/utilities/foo
> svn co -N file:///tmp/svnrepos/trunk/common/software/utilities/foo/
> bar \
> common/software/utilities/foo/bar
> svn co -N file:///tmp/svnrepos/trunk/common/software/utilities/foo/
> bar/src \
> common/software/utilities/foo/bar/src
> svn co -N file:///tmp/svnrepos/trunk/common/software/utilities/foo/
> bar/include \
> common/software/utilities/foo/bar/include

To your other comment:

> Also the directories foo and bar are not modified based on their
> permissions in the repository. So foo and bar might have different
> permissions than if you checked out foo.

Subversion does not store permissions in the repository, so there is
no difference here. That is, it can store a file's execute permission
by setting its svn:executable property, but that's all (unless you're
using the unofficial meta-data-versioning branch).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 6 18:27:26 2006

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.