You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tech Geek <te...@gmail.com> on 2010/10/19 02:52:43 UTC

Having a path name after specifying repository location

Hi,

My repository path is /var/lib/svn for the SVN server. However I encountered
a unique situation as follow:

The following works:
#svnadmin create  /var/lib/svn/projectA

>From a svn client:
#svn co http://svnserver/svn/projectA projectA


However the following does NOT work:
#mkdir /var/lib/svn/projectB/
#sudo svnadmin create  /var/lib/svn/projectB/partA
 #sudo svnadmin create  /var/lib/svn/projectB/partB

>From a svn client:
#svn co http://svnserver/svn/projectB/partA partB

Is it true that all the directories directly under /var/lib/svn/ should be
an *actual* repository? Can't we have some pathname like "ProjectB" under
/var/lib/svn/ and then have repositories (like PartA and PartB) under it
without changing the root path of the repository which is /var/lib/svn?

How do you overcome this situation? I want PartA and PartB to be separate
SVN repository but I do not want to place them under /var/lib/svn/ directory
because they beloing to ProjectB and in future other projects like ProjectD
could have PartA and PartB in the same manner.

Thanks.

Re: Having a path name after specifying repository location

Posted by Tech Geek <te...@gmail.com>.
Sorry for bumping this one...We really need to find a solution/workaround
for this in order for our SVN implementation to be final.

Thanks in advance!

On Mon, Oct 18, 2010 at 6:00 PM, Tech Geek <te...@gmail.com> wrote:

> oops...I had a typo:
>
>
>> However the following does NOT work:
>> #mkdir /var/lib/svn/projectB/
>> #sudo svnadmin create  /var/lib/svn/projectB/partA
>>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>>
>> From a svn client:
>> #svn co http://svnserver/svn/projectB/partA partB
>>
>
>  However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partA
>
> I get the error message: SVN: Could not open the requested filesystem.
>
>

Re: Having a path name after specifying repository location

Posted by Tech Geek <te...@gmail.com>.
oops...I had a typo:


> However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partB
>

 However the following does NOT work:
#mkdir /var/lib/svn/projectB/
#sudo svnadmin create  /var/lib/svn/projectB/partA
 #sudo svnadmin create  /var/lib/svn/projectB/partB

Re: Having a path name after specifying repository location

Posted by Tech Geek <te...@gmail.com>.
 Andy:

>  As I asked earlier, why must PartA & PartB in a given project be
> separate repositories? Why is the more conventional approach not
> workable for you?
>
I understand what you are trying to say and I agree but let's just say that
my hands are tied without going into too much details. This is how the
stakeholders want it. You know how it is in organizations...

Re: Having a path name after specifying repository location

Posted by Andy Levy <an...@gmail.com>.
On Wed, Oct 20, 2010 at 15:10, Tech Geek <te...@gmail.com> wrote:
>>The other way you could do this, if you insist upon PartA & PartB  being
>> separate repositories, is to have a different <Location> >block for each
>> project, and specify SVNParentPath as /var/lib/svn/ProjectB . Then you could
>> have PartA & PartB set up as separate >repositories - albeit with a lot more
>> management overhead as you add projects/repositories, and potentially more
>> confusion.
>
> You mean something like this?
> <Location "/svn">
>         DAV svn
>         SVNParentPath /var/lib/svn/projectA
>         SVNListParentPath On
>         AuthBasicProvider ldap
>         AuthType Basic
>         AuthzLDAPAuthoritative off
>         AuthName "Subversion Repositories"
>         ......
>         ......
>         require valid-user
> </Location>
>
> <Location "/svn">
>         DAV svn
>         SVNParentPath /var/lib/svn/projectB
>         SVNListParentPath On
>         AuthBasicProvider ldap
>         AuthType Basic
>         AuthzLDAPAuthoritative off
>         AuthName "Subversion Repositories"
>         ......
>         ......
>         require valid-user
> </Location>

No, you would need

<Location "/svnA">

<Location"/svnB">

> Would be nice if someone already has a script (that excepts the name of the
> repository) that does the job of entering the <Locaiton> block in the apache
> configuration file.
>
> Also why svn does not support nesting paths (logical empty folder) under
> repository location. I am sure many people might have encountered simialar
> issues especially if they have existing projects before they started using
> subversion.

I think you're getting confused about the relationships between
"projects" and repositories, and introducing many more layers than
needed.

As I asked earlier, why must PartA & PartB in a given project be
separate repositories? Why is the more conventional approach not
workable for you?

Re: Having a path name after specifying repository location

Posted by Tech Geek <te...@gmail.com>.
>The other way you could do this, if you insist upon PartA & PartB  being
separate repositories, is to have a different <Location> >block for each
project, and specify SVNParentPath as /var/lib/svn/ProjectB . Then you could
have PartA & PartB set up as separate >repositories - albeit with a lot more
management overhead as you add projects/repositories, and potentially more
confusion.

You mean something like this?
<Location "/svn">
        DAV svn
        SVNParentPath /var/lib/svn/projectA
        SVNListParentPath On
        AuthBasicProvider ldap
        AuthType Basic
        AuthzLDAPAuthoritative off
        AuthName "Subversion Repositories"
        ......
        ......
        require valid-user
</Location>

<Location "/svn">
        DAV svn
        SVNParentPath /var/lib/svn/projectB
        SVNListParentPath On
        AuthBasicProvider ldap
        AuthType Basic
        AuthzLDAPAuthoritative off
        AuthName "Subversion Repositories"
        ......
        ......
        require valid-user
</Location>

and so on....

Would be nice if someone already has a script (that excepts the name of the
repository) that does the job of entering the <Locaiton> block in the apache
configuration file.

Also why svn does not support nesting paths (logical empty folder) under
repository location. I am sure many people might have encountered simialar
issues especially if they have existing projects before they started using
subversion.

 Thanks for the help.

Re: Having a path name after specifying repository location

Posted by Andy Levy <an...@gmail.com>.
On Wed, Oct 20, 2010 at 12:11, Andy Levy <an...@gmail.com> wrote:
> On Mon, Oct 18, 2010 at 20:52, Tech Geek <te...@gmail.com> wrote:
>> Hi,
>>
>> My repository path is /var/lib/svn for the SVN server. However I encountered
>> a unique situation as follow:
>>
>> The following works:
>> #svnadmin create  /var/lib/svn/projectA
>>
>> From a svn client:
>> #svn co http://svnserver/svn/projectA projectA
>>
>>
>> However the following does NOT work:
>> #mkdir /var/lib/svn/projectB/
>> #sudo svnadmin create  /var/lib/svn/projectB/partA
>> #sudo svnadmin create  /var/lib/svn/projectB/partB
>>
>> From a svn client:
>> #svn co http://svnserver/svn/projectB/partA partB
>>
>> Is it true that all the directories directly under /var/lib/svn/ should be
>> an *actual* repository?
>
> No, they will not be a single, unified repository. You have created
> two separate repositories,  /var/lib/svn/projectB/partA and
> /var/lib/svn/projectB/partB
>
>> Can't we have some pathname like "ProjectB" under
>> /var/lib/svn/ and then have repositories (like PartA and PartB) under it
>> without changing the root path of the repository which is /var/lib/svn?
>
> Subversion does not support "nesting" like this. Your repository must
> be an immediate child directory of /var/lib/svn .

Edit: I should have specified this as "the path you have set as your
SVNParentPath"

>> How do you overcome this situation? I want PartA and PartB to be separate
>> SVN repository but I do not want to place them under /var/lib/svn/ directory
>> because they beloing to ProjectB and in future other projects like ProjectD
>> could have PartA and PartB in the same manner.
>
> If PartA & PartB are part of the same project, why are they in
> separate repositories in the first place?
>
> A more conventional approach would be:
>
> /var/lib/svn/ProjectB
> /var/lib/svn/ProjectD
>
> And then PartA & PartB would be paths *inside* the ProjectB repository
> - not distinct repositories themselves.
>

The other way you could do this, if you insist upon PartA & PartB
being separate repositories, is to have a different <Location> block
for each project, and specify SVNParentPath as /var/lib/svn/ProjectB .
Then you could have PartA & PartB set up as separate repositories -
albeit with a lot more management overhead as you add
projects/repositories, and potentially more confusion.

Re: Having a path name after specifying repository location

Posted by Andy Levy <an...@gmail.com>.
On Mon, Oct 18, 2010 at 20:52, Tech Geek <te...@gmail.com> wrote:
> Hi,
>
> My repository path is /var/lib/svn for the SVN server. However I encountered
> a unique situation as follow:
>
> The following works:
> #svnadmin create  /var/lib/svn/projectA
>
> From a svn client:
> #svn co http://svnserver/svn/projectA projectA
>
>
> However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
> #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partB
>
> Is it true that all the directories directly under /var/lib/svn/ should be
> an *actual* repository?

No, they will not be a single, unified repository. You have created
two separate repositories,  /var/lib/svn/projectB/partA and
/var/lib/svn/projectB/partB

> Can't we have some pathname like "ProjectB" under
> /var/lib/svn/ and then have repositories (like PartA and PartB) under it
> without changing the root path of the repository which is /var/lib/svn?

Subversion does not support "nesting" like this. Your repository must
be an immediate child directory of /var/lib/svn .

> How do you overcome this situation? I want PartA and PartB to be separate
> SVN repository but I do not want to place them under /var/lib/svn/ directory
> because they beloing to ProjectB and in future other projects like ProjectD
> could have PartA and PartB in the same manner.

If PartA & PartB are part of the same project, why are they in
separate repositories in the first place?

A more conventional approach would be:

/var/lib/svn/ProjectB
/var/lib/svn/ProjectD

And then PartA & PartB would be paths *inside* the ProjectB repository
- not distinct repositories themselves.

Re: Having a path name after specifying repository location

Posted by Tech Geek <te...@gmail.com>.
oops...I had a typo:


> However the following does NOT work:
> #mkdir /var/lib/svn/projectB/
> #sudo svnadmin create  /var/lib/svn/projectB/partA
>  #sudo svnadmin create  /var/lib/svn/projectB/partB
>
> From a svn client:
> #svn co http://svnserver/svn/projectB/partA partB
>

 However the following does NOT work:
#mkdir /var/lib/svn/projectB/
#sudo svnadmin create  /var/lib/svn/projectB/partA
 #sudo svnadmin create  /var/lib/svn/projectB/partB

>From a svn client:
#svn co http://svnserver/svn/projectB/partA partA

I get the error message: SVN: Could not open the requested filesystem.