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

Re: checkout

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-05-08 19:17:44 CEST

On May 8, 2006, at 17:56, Hector Alvarez Pol wrote:

> Ryan Schmidt wrote:
>
>> John Allen's answer was correct, except for the erroneous colon
>> after the hostname. The correct commands are:
>>
>> mkdir simsDir
>> cd simsDir
>> svn checkout http://misite.com/mySim1/trunk mySim1
>> svn checkout http://misite.com/mySim2/trunk mySim2
>>
>> This assumes that you have a directory "trunk" in both the mySim
>> repository and the mySim2 repository. The error message you
>> showed above suggests that you do not... I, too, would be
>> interested in the answer to David Gale's question: What does a
>> listing of the root of your repositories actually look like?
>
> I will here try to show the output of the commands and the
> structure, as clear as possible:
>
> A) Using http on a remote site:
> 1 - full repository (all the four combinations I test seems to
> work)
> svn checkout http://mysite.com/mySim1/ mySim1
> A mySim1/mySim1
> A mySim1/mySim1/trunk ... OK,
> success
> svn checkout http://mysite.com/mySim1/ .
> A mySim1
> A mySim1/
> trunk ... OK, success
> svn checkout http://mysite.com:/mySim1/ mySim1
> A mySim1/mySim1
> A mySim1/mySim1/trunk ...
> OK, success
> svn checkout http://mysite.com:/mySim1/ .
> A mySim1
> A mySim1/
> trunk ... OK, success
> So, all succesfull, independently of the : after the site name
> (tags and branches are also included in the
> pack). 2 - only checking out the trunk directory
> svn checkout http://mysite.com/mySim1/trunk mySim1
> svn: REPORT request failed on '/mySim1/!svn/bc/2/trunk'
> svn: '/mySim1/!svn/bc/2/trunk' path not found
> svn checkout http://mysite.com:/mySim1/trunk mySim1
> svn: REPORT request failed on '/mySim1/!svn/bc/2/trunk'
> svn: '/mySim1/!svn/bc/2/trunk' path not found
> So, both unsuccesfull, independently of the : after the site name.
> B) As a local user (same machine as the repository):
> svn checkout file:///scratch/hapol/svnroot/mySim1/trunk mySim1
> A mySim1/file1
> ...
> (success, only the trunk; no branches and tags directories)
>
> svn checkout file:///scratch/hapol/svnroot2/mySim2/trunk mySim2
> A mySim2/file1
> ...
> (success, only the trunk; no branches and tags directories)
>
>
> C) The answer to "svn ls" is (again as a remote):
> svn ls http://mysite.com:/mySim1/
> mySim1/
> and I make the command locally svn ls file:///scratch/
> hapol/svnroot1
> mySim1/
>
> D) I have in my notes the procedure I follow to create the second
> repository...
> > pwd
> localDir/mySim2
> > mkdir trunk
> > mv ../../codeValid/* trunk/.
> > mkdir branches
> > mkdir tags
> > ls
> branches tags trunk
> > svn import . file:///scratch/hapol/svnroot2/mySim2 -m "initial
> import"
> Adding trunk
> Adding trunk/file1
> ...
> Adding trunk/README
> Adding branches
> Adding tags
>
> Committed revision 2.
>
>
> So, for me it is quite clear that I created the trunk (I do not
> know if something is incorrect). And is clear that locally I can
> checkout only the trunk part (no branches or tag directories). But
> remotely using the http protocol, I cannot do it. Regarding the
> apache condifguration, I stick to my first mail.
> Please, let me know if something is inconsistent in my explanation.
>
> Thank you very much for you active help :-)

Your welcome. :-)

Ok, now that all sounds consistent. You have:

a repository /scratch/hapol/svnroot1
which is accessible via the URL http://mysite.com/mySim1
It contains a directory mySim1
and that contains a directory trunk

and

a repository /scratch/hapol/svnroot2
which is accessible via the URL http://mysite.com/mySim2
It contains a directory mySim2
and that contains a directory trunk

So part of the confusing bit is that you've got a repository http://
mysite.com/mySim1 which contains only a directory mySim1. So the URL
to the trunk of mySim1 is http://mysite.com/mySim1/mySim1/trunk which
is a bit redundant from the user perspective. If the repository
http://mysite.com/mySim1 is only going to contain the project mySim1
then there's no reason to have just a top-level directory mySim1 in
it; just put trunk, branches and tags directoly at the top level,
thus making the URL a bit easier to use.

Anyway. If the goal is to end up with this checked out structure on
disk:

simsdir/
        mySim1/ <-- this is the mySim1 trunk
        mySim2/ <-- this is the mySim2 trunk

Then, given your current setup, the way to achieve that with http://
URLs is:

        mkdir simsdir
        cd simsdir
        svn co http://mysite.com/mySim1/mySim1/trunk mySim1
        svn co http://mysite.com/mySim2/mySim2/trunk mySim2

And the way to achieve it with file:/// URLs is:

        mkdir simsdir
        cd simsdir
        svn co file:///scratch/hapol/svnroot1/mySim1/trunk mySim1
        svn co file:///scratch/hapol/svnroot2/mySim2/trunk mySim2

It would seem simpler to me if you would call the repositories
"mySim1" and "mySim2" instead of "svnroot1" and "svnroot2". Then you
could also use the SVNParentPath directive once to serve all
repositories instead of having to use separate SVNPath directives for
each repository. Of course that's up to you. But if you plan to add
more repositories, it's cumbersome to have to edit the Apache
configuration each time. With SVNParentPath you just designate a
single directory which will contain all your repositories and you
just create them as you need them.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon May 8 19:19:13 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.