You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David L <id...@hotmail.com> on 2006/04/06 04:47:12 UTC
newbie checkout question
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?
Thanks... David
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: newbie checkout question
Posted by David L <id...@hotmail.com>.
[snip]
>>>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
>
>Sorry, no, wait, that's wrong. The first command should be a checkout; all
>subsequent commands should be updates. Otherwise you've got unrelated
>working copies nested within each other, which isn't the idea.
>
>svn co -N \
> file:///tmp/svnrepos/trunk/common
>
>svn up -N \
> common/software \
> common/software/utilities\
> common/software/utilities/foo \
> common/software/utilities/foo/bar
>
>svn up \
> common/software/utilities/foo/bar/src \
> common/software/utilities/foo/bar/include
>
>Note that with -N you still get all files in the various directories; it's
>only subdirectories that are omitted.
>
>Note also that -N is considered broken. Whether it's too broken to be of
>use to you, you'll have to decide on your own, just be aware that some
>things might be weird when you use this option.
>
>http://subversion.tigris.org/issues/show_bug.cgi?id=695
>
>
I think I've found that this problem is already logged as an enhancement
request
in the subversion database:
http://subversion.tigris.org/issues/show_bug.cgi?id=823
As you mentioned, the -N option is broken and this enhancement needs -N to
work. :(
Thanks again...
David
_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: newbie checkout question
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 6, 2006, at 18:24, Ryan Schmidt wrote:
> 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
Sorry, no, wait, that's wrong. The first command should be a
checkout; all subsequent commands should be updates. Otherwise you've
got unrelated working copies nested within each other, which isn't
the idea.
svn co -N \
file:///tmp/svnrepos/trunk/common
svn up -N \
common/software \
common/software/utilities\
common/software/utilities/foo \
common/software/utilities/foo/bar
svn up \
common/software/utilities/foo/bar/src \
common/software/utilities/foo/bar/include
Note that with -N you still get all files in the various directories;
it's only subdirectories that are omitted.
Note also that -N is considered broken. Whether it's too broken to be
of use to you, you'll have to decide on your own, just be aware that
some things might be weird when you use this option.
http://subversion.tigris.org/issues/show_bug.cgi?id=695
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: newbie checkout question
Posted by Ryan Schmidt <su...@ryandesign.com>.
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
Re: newbie checkout question
Posted by David L <id...@hotmail.com>.
> On Apr 6, 2006, at 06:47, 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.
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.
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
These take 6 seconds on my computer on a basically empty repository... the
equivalent line in CVS takes 2 seconds. It's also a pain to change a script
that checked out a few select directories fro CVS to one that does the all
the stuff I had to do above. Is there an easier/faster way?
Thanks...
David
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar � get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: newbie checkout question
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 6, 2006, at 06:47, 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org