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

Re: Problem with new svn_fs_type() API

From: <kfogel_at_collab.net>
Date: 2005-09-23 22:43:55 CEST

"Max Bowsher" <maxb@ukf.net> writes:
> Therefore I propose changing the interface from:
> const char *svn_fs_type (svn_fs_t *fs);
> to:
> svn_error_t *svn_fs_type (const char **fs_type, const char *path,
> apr_pool_t *pool);
> and replacing the current implementation with one based on the 'read
> the fs-type file' code in fs-loader.c:fs_library_vtable(), as I
> suggested in my previous patch.

I started on this, and right away ran into a question:

Should the 'path' parameter be path to repos, or path to the fs subdir
inside the repos?

At first I thought: "Obviously, it should be the repository path,
because theoretically, if you don't know the type of the fs, you can't
know where inside the repos to find it. Sure, currently all fs's live
in the "db/" subdir, but maybe that won't always be true."

But then I looked at some of our existing svn_fs_*() APIs that take a
path, and they actually want the path to repos/db, not to repos. They
don't document this clearly, but an examination of callers shows it to
be true. See svn_fs_create() and svn_fs_open(), for example.

Now I'm not sure what to do. My API design instincts say repos path,
but my consistency instincts say fs-inside-repos path.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 23 23:51:02 2005

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.