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

Re: Sharing libsvn_fs_* internals [was: "Locked" messages useless]

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-11-02 14:49:04 CET

Julian Foad <julianfoad@btopenworld.com> writes:

> To recap, I'm talking about the two files
> subversion/libsvn_fs_{base,fs}/err.c being almost identical. I've
> just committed cosmetic changes to remove spurious differences so that
> they can be compared side-by-side more easily. Likewise their header
> files err.h. The remaining differences are tiny.
>
> It's not just those files. Presumably, if the two filesystems use the
> same set of error messages, then there is much in common in their
> implementation. I haven't looked further in detail.

There are quite a few similarities in the logic of the backend. The
foremost difference is that in the BDB code, there are 'trail'
arguments all over the map, whereas the FSFS code has none. This is a
pretty significant difference, though.

I spent a few hours thinking about the next generation of our
filesystem last night, and I'm convinced at this point that to undergo
some sort of major code unification effort today would be a waste.
Better to begin thinking about how to properly segregate the business
logic from the storage format peculiarities in the next generation of
the filesystem; better still to invest real effort into deciding if
we've a need for multiple backends at all.

> At the moment, while I'd be happy to go the clean, layered,
> potentially public route, I don't think the amount of sharing is large
> enough to require that, and so I'd be happy to put more shared stuff
> in libsvn_fs which is simpler in the short term, as long as we keep
> our eyes open for the point when it starts to get unreasonably complex
> and do the refactoring then.
>
> That said, I'm not going to do anything unless those who work in that
> part of the code base want it.

I'm fine with the circular dependency. The error stuff can move into
libsvn_fs, as can the svn_fs_*__canonicalize_abspath(). I caution
against futzing with anything but such low-hanging fruit.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 2 14:51:15 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.