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

RE: svn commit: r980811 - in /subversion/trunk/subversion/libsvn_fs_fs: fs.h fs_fs.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 1 Aug 2010 23:21:02 +0200

> -----Original Message-----
> From: 'Stefan Sperling' [mailto:stsp_at_elego.de]
> Sent: zondag 1 augustus 2010 23:09
> To: Bert Huijben
> Cc: dev_at_subversion.apache.org
> Subject: Re: svn commit: r980811 - in
> /subversion/trunk/subversion/libsvn_fs_fs: fs.h fs_fs.c
>
> On Sun, Aug 01, 2010 at 10:56:47PM +0200, Bert Huijben wrote:
> > Looking a bit further: Do we really need to take the absolute path
> for the
> > error message? (What do we in similar code paths?)
>
> I would like Subversion to print helpful error message.
> Though the path need not be absolute, but see below.
>
> > The easiest way to fix this would be to just use the caller provided
> paths
> > in the error message. That would immediately fix the error leak.
>
> The caller-provided paths contain a trailing '/db', and running upgrade
> with those doesn't work:
>
> $ svnadmin upgrade repos/db
> subversion/svnadmin/main.c:1543: (apr_err=2)
> subversion/libsvn_repos/repos.c:1572: (apr_err=2)
> subversion/libsvn_repos/repos.c:1502: (apr_err=2)
> subversion/libsvn_repos/repos.c:1338: (apr_err=2)
> subversion/libsvn_repos/repos.c:1338: (apr_err=2)
> svnadmin: Error opening db lockfile
> subversion/libsvn_subr/io.c:1625: (apr_err=2)
> subversion/libsvn_subr/io.c:2714: (apr_err=2)
> svnadmin: Can't open file 'repos/db/locks/db.lock': No such file or
> directory
>
> So we cannot advise users to run the command with 'db' at the end.
> We could use the relative paths to avoid further SVN_ERR() calls, sure.
> But you've also said that you didn't want the dirname() hack to strip
> off the trailing 'db'.

I'm not against doing this.. I just think we should fix the other messages
too, if we decide this is the right thing to do.

I'm not aware of direct users of our fs layer, that would have an issue with
this fix... So please stand up if you care!!!
(And in case nobody stands up we should fix those other errors).

> So I'm not sure how you'd like to make Subversion provide a useful
> error message for this case.
>
> > In this case you would need to use src_path for the error message
> anyway if
> > the svn_dirent_get_absolute() fails.
>
> That's very likely not gonna fail. We've already opened the repository.
>
> Stefan
Received on 2010-08-01 23:21:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.