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

Perl binding and "svn ls -R" using access restricted pathes

From: Charles Hardin <chardin_at_2wire.com>
Date: 2007-04-11 20:20:56 CEST

Having a little trouble getting the desired behavior of just the list of
directories that are viewable by a particular user. The background for this
is doing a crawl of the subversion repository for a web indexer - and
instead of doing a checkout, just traversing the tree in subversion.

The behavior that would be easier is just the full ls without erroring out,
kind of like doing an "ls -R" on the filesystem that you don't have access
to everything on.

Setup a subversion repository with an access.conf like:
[groups]
special = bob,jane

[/]
* = rw

[/project/private]
* =
@special = rw

Using the following attach svnls.pl:
$ ./svnls.pl --user anonymous --url https://example.com/svn/project
Reference found where even-sized list expected at ./svnls.pl line 23.
RA layer request failed: PROPFIND request failed on '/svn/project/private':
PROPFIND of '/svn/project/private': 403 Forbidden (https://example.com) at
./svnls.pl line 42

From the command line there doesn't appear to be way to do a recursive ls
with just what you have access to and not error out...
$ svn ls --username anonymous -R https://example.com/svn/project
Error validating server certificate for 'https://example.com:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 ... Omitted ...
(R)eject, accept (t)emporarily or accept (p)ermanently? t
private/
svn: PROPFIND request failed on '/svn/project/private'
svn: PROPFIND of '/svn/project/private': 403 Forbidden (https://example.com)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

  • application/octet-stream attachment: svnls.pl
Received on Thu Apr 12 00:02:59 2007

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.