I'm sorry: yes, I'm using apache and svn modules.
We like to handle some repositories in the form:
<location>/<type>/<company>/<project>/<files>.
Examples physical directories:
E:/svnroot/dev/cmp1/proj1/files..
E:/svnroot/dev/cmp1/proj2/files..
E:/svnroot/deploy/cmp2/proj3/files..
We need to browse the folders under root, folder1 (dev, deploy, ..) until cmpX as file system: when we enter into a cmpX, we'd like to view all the projects(repositories) and then, within a project, all the files.
http://srv:8080/ - we want to see dev/, deploy/ folders
http://srv:8080/dev - we want to see cmp1, cmp2, cmp3, .. folders
http://srv:8080/dev/cmp2 - we want to see all the projects as a list of repositories
We need Windows authentication: so we use SSPI.
This is a piece of our httpd.conf file:
<Location /dev/cmp1>
DAV svn
SVNListParentPath on
# SVNPath e:/svnroot/dev/ cmp1/
SVNReposName "Repository progetti sviluppo cmp1"
SVNParentPath e:/svnroot/dev/ cmp1/
AuthzSVNAccessFile e:/svnroot/svn-acl
# AuthType Basic
AuthName "Subversion repository"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain cmp1
SSPIOmitDomain On # keep domain name in userid string
SSPIOfferBasic On # let non-IE clients authenticate
SSPIBasicPreferred Off # should basic authentication have higher priority
SSPIUsernameCase lower
Require valid-user
</Location>
We will create other sections for comp2 .. companies.
When we point to svn folders, we see the files by the SVN system: we need to view the upper folders.
> > Da: Cooke, Mark [mailto:mark....@siemens.com]
> > Inviato: lunedì 31 ottobre 2011 13.47
> > A: Stefano Mora; 'us...@subversion.apache.org'
> > Oggetto: [SPAM] - RE: Browsing folders and SVN - Trovata
> parola o parole list
> > error nel corpo del testo
> >
> > How do you want to serve your svn content? I assume something
> > like apache? Then you would configure svn to serve 'folder2'
> > as the SVNParentPath [1]. You would need to configure apache to
> > expect 'folder1' as part of the path (in the <Location>
> > directive), that would not be required by subversion.
> >
> > Perhaps you could post the relevant bits of your apache
> > config (if that is what you are using)?
> >
> > ~ mark c
> >
> > [1] http://stackoverflow.com/questions/488778/how-do-i-list-all-repositories-with-the-svnparentpath-directive-on-apachesvn
> -----Original Message-----
> From: Stefano Mora [mailto:sm...@eos.pr.it]
> Sent: 31 October 2011 14:09
> To: Cooke, Mark; 'us...@subversion.apache.org'
> Subject: R: RE: Browsing folders and SVN - Trovata parola o
> parole list error nel corpo del testo
>
> I'm sorry: yes, I'm using apache and svn modules.
> We like to handle some repositories in the form:
> <location>/<type>/<company>/<project>/<files>.
>
> Examples physical directories:
> E:/svnroot/dev/cmp1/proj1/files..
> E:/svnroot/dev/cmp1/proj2/files..
> E:/svnroot/deploy/cmp2/proj3/files..
>
> We need to browse the folders under root, folder1 (dev,
> deploy, ..) until cmpX as file system: when we enter into a
> cmpX, we'd like to view all the projects(repositories) and
> then, within a project, all the files.
> http://srv:8080/ - we want to see dev/, deploy/ folders
> http://srv:8080/dev - we want to see cmp1, cmp2, cmp3, .. folders
> http://srv:8080/dev/cmp2 - we want to see all the projects as
> a list of repositories
>
> We need Windows authentication: so we use SSPI.
(aside: SSPI seems unsupported so I moved to mod_ldap which is harder to understand but current once you have got there)
> This is a piece of our httpd.conf file:
>
> <Location /dev/cmp1>
> DAV svn
> SVNListParentPath on
> # SVNPath e:/svnroot/dev/ cmp1/
> SVNReposName "Repository progetti sviluppo cmp1"
> SVNParentPath e:/svnroot/dev/ cmp1/
>
> AuthzSVNAccessFile e:/svnroot/svn-acl
>
> # AuthType Basic
> AuthName "Subversion repository"
> AuthType SSPI
> SSPIAuth On
> SSPIAuthoritative On
>
> SSPIDomain cmp1
> SSPIOmitDomain On # keep domain name in userid string
> SSPIOfferBasic On # let non-IE clients authenticate
> SSPIBasicPreferred Off # should basic authentication
> have higher priority
> SSPIUsernameCase lower
> Require valid-user
> </Location>
>
> We will create other sections for comp2 .. companies.
>
> When we point to svn folders, we see the files by the SVN
> system: we need to view the upper folders.
>
Sorry, now I understand what you want I am not sure how to do it. When you add the <Location "url"> DAV svn sections, subversion will try to serve all paths that start with "url" so you cannot expose anything below that path.
However, you should be able to expose things short of that path using normal apache stuff. What do you want to be able to do with the files in the intermediate folders? Just read-only access (in which case investigate mod_dir at http://httpd.apache.org/docs/2.0/mod/mod_dir.html) or more complex WebDAV actions?
~ mark c
The intermediate folders have to be absolutely read-only, only admin can change them, and i guess they will have no files, only folders.
The idea is to have something to browse both the folders and the svn repositories and, in the meantime, visually build the path for the svn clients (Tortoise): we can simply copy-and-paste the path from browser to svn client :)
So far, if we query the intermediate folders we have:
- error if we query the compX level by the command line, instead of the list of repositories (no matter)
- the list of repositories if we query the compX folder by the IE (OK)
- file if we query the lower folders (SVN) (OK)
- error 404 if we query with IE the intermediate folders (problem)
-----
Stefano
> The intermediate folders have to be absolutely read-only,
> only admin can change them, and i guess they will have no
> files, only folders.
I handle this with a hand-crafted front page but I only have one level to maintain and only use this for displaying news and links to the other sections (handled by separate SVNParentPaths). If you check out the apache mod_dir docs referenced earlier, you can provide a script to generate pages for relevant directories.
> The idea is to have something to browse both the folders and
> the svn repositories and, in the meantime, visually build the
> path for the svn clients (Tortoise): we can simply
> copy-and-paste the path from browser to svn client :)
Subversion can provide a browsable interface (I think you have this working already). Check out the Tortoise Help file (search for 'svnindex') for info on their subversion template which provides nice windows integration...
> So far, if we query the intermediate folders we have:
> - error if we query the compX level by the command line,
> instead of the list of repositories (no matter)
To be expected, svn client does not expect & cannot handle the list of repositories.
> - the list of repositories if we query the compX folder by the IE (OK)
> - file if we query the lower folders (SVN) (OK)
> - error 404 if we query with IE the intermediate folders (problem)
For these last you will need to configure apache to serve what you want. I am not an apache expert and this is probably outside the scope of this list... Subversion will not help you here. Check out the info at http://httpd.apache.org, mod_dir referenced above plus the <Directory> and DocumentRoot directives. At the simplest level and if this is OK with your security requirements, just put (or generate) and index.html in each of the relevant directories below DocumentRoot (which you could set to E:/svnroot)...
~ mark c