简体   繁体   English

如何在 apache dav svn 中指定存储库?

[英]How to specify the repository in apache dav svn?

I have the following setup:我有以下设置:

<VirtualHost *:80>
    ServerName svn.project1.com

    <Location />
       DAV svn
       SVNPath /svn
    </Location>
</VirtualHost>


<VirtualHost *:80>
    ServerName svn.project2.com

    <Location />
       DAV svn
       SVNPath /svn
    </Location>
</VirtualHost>

When I navigate to either http://svn.project1.com/ or http://svn.project1.com/ , it gives a directory listing with both repositories:当我导航到http://svn.project1.com/http://svn.project1.com/时,它会给出一个包含两个存储库的目录列表:

Revision 1270: /

* project1/
* project2/

Powered by Subversion version 1.4.4 (r25188)

How do I get both hosts to point to their respective repositories?如何让两个主机都指向各自的存储库?

I want to be able to use URLs like:我希望能够使用如下 URL:

http://svn.project1.com/trunk/

Instead of:代替:

http://svn.project1.com/project1/trunk/

And thus prevent access to eg project2 from project1 viz:从而防止从 project1 访问例如 project2,即:

http://svn.project1.com/project2/

This works with SVNPath /svn/project# .这适用于SVNPath /svn/project# But be aware, I think this only works if you really have two seperate repositories.但是请注意,我认为这仅在您确实有两个单独的存储库时才有效。 As far as I can tell from your information, you're using one repository for both projects.据我从您的信息中得知,您对两个项目都使用了一个存储库。

<Location /svn/>
     DAV svn
     SVNParentPath "D:\repos"
     SVNListParentPath On
     AuthName "Subversion repository"
     SVNPathAuthz on
     AuthType SSPI
     SSPIAuth On
     SSPIAuthoritative On
     SSPIDomain RAILINC
     SSPIOfferBasic On
     SSPIUsernameCase lower
     SSPIOmitDomain On
     AuthzSVNAccessFile "D:\repos\svnaccessfile.txt"
     Require valid-user
</Location>

Not sure, but have you tried this?不确定,但你试过吗?

SVNPath /svn/project1/

While using使用时

SVNPath /svn/projectX/

should fix your problem, it will expose a serious flaw in DavSVN.应该解决您的问题,它将暴露 DavSVN 中的一个严重缺陷。 The flaw that it has problems with being at the root directory of a domain.它在域的根目录中存在问题的缺陷。 Getting random checkin errors that at present, have no solution available, was such a problem we had to switch from a subdomain to a subdirectory.出现目前没有可用解决方案的随机签入错误是我们不得不从子域切换到子目录的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM