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

Re: Cannot determine fs type from svn_fs_t

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-06-14 01:03:46 CEST

Karl Fogel wrote:
> Blair Zajac <blair@orcaware.com> writes:
>> I'm writing some code to rename FSFS transactions if the filesystem is
>> FSFS
>
> Hmm, wait a sec, wouldn't it be better to avoid situations where some
> backends are treated differently from others? Is there any other way
> to do what you want to do?

Not against 1.4.x. I'll use svn_fs_type() and do the transaction
renaming. A patch for 1.5.x to make transaction names unique will
remove the need for me to check the filesystem type.

>> and I was surprised to see that there's no API call given a
>> svn_fs_t to do this, I have to use svn_fs_type() which takes a path to
>> the filesystem. I'd rather not do more IO if I already have an
>> svn_fs_t.
>>
>> Is there any reason not to save the filesystem type in svn_fs_t and
>> add a call to get it? Would this break binary compatibility? Is
>> there a good reason not to do this? Where would be the best place to
>> make this change?
>
> It should be okay to add a new field to the end of svn_fs_t in
> libsvn_fs/fs-loader.h, since publicly it's an opaque type. But before
> you do this, does what you're doing really need to know the fs type?
> I have to admit that sets of warning bells in my heady-head-head...

Well, there already is svn_fs_type() that people can use, it's just odd
that even if you had a svn_fs_t you can't ask for the type, but you
could ask svn_fs_type(), which has the extra IO since you're passing it
a char *.

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 14 01:04:01 2007

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.