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

Re: need help setting up svn+ssh://

From: Guido van Rossum <guido_at_python.org>
Date: 2003-08-25 02:54:47 CEST

> > Request to the svnserve developers: try to distinguish between
> > permission problems on the repository and "no repository found".
>
> This is a common problem, many have complained. I'm not sure how to
> fix it, though. Ultimately it's BerkeleyDB that throws an error, and
> I think it's pretty vague -- like "hey, I couldn't open the db
> environment." BerkeleyDB never says *why* it couldn't open the
> environment (permission problem? is it not there? etc.) So
> Subversion is just relaying the same vague message back to the user.
> I wonder if we can make this situation better, somehow.

That's not quite true. I looked at the code in svnserve and it throws
away the BerkeleyDB error, replacing it with a generic svn error
instead. (I'd give the line number but I don't have svn checked out
here.) This is understandable because when you pass it something like

  svn://host/path/to/repos/sub/subsub/subsubsubdir

it doesn't know where the path to the repository ends and where the
subdirectories of the repository begin, so it tries every possibility
(from the back) until it gets a hit.

But I recall printing the error that BerkeleyDB gave, and noticing
immediately that it complained about permissions, which helped me
track down the problem (and also later problems that were variations
of the first one -- all had to do with broken permissions).

So I expect that you *can* distinguish between (paraphrasing) "no
database there" and "no permission to open that database" from the
BerkeleyDB error code. In that case I would recommend passing the
most specific error (anything else than "no database there") back to
the client. You could also try to detect the repository through
different means, e.g. looking for something that has a subdirectory
named "db", and only trying the BerkeleyDB open call if that is
found.

--Guido van Rossum (home page: http://www.python.org/~guido/)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 25 03:39:44 2003

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.