subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <>
Subject Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)
Date Wed, 01 Apr 2015 10:11:21 GMT
Sergey Raevskiy wrote on Tue, Mar 31, 2015 at 16:31:55 +0300:
> > Wouldn't it be easier, and a smaller patch, to add a check in
> > svn_repos_create that the FS type is valid /before/ creating the
> > repository structure? This would also avoid adding yet another public API.
> As I understand there is no public API for checking if FS-type is valid and
> corresponding FS module is available (for DSO-enabled builds).
> Even if we do a preliminary check like that, there are a number of other
> errors that could occur during module loading and filesystem creation.
> I used 'invalid-fs-type' in test just as simple and predictable way to fail
> the filesystem creation.

I don't think it's a very robust way to cause svn_repos_create() to
fail, precisely for the reason brane mention: the implementation might
trip on the invalid FS value (DSO support notwithstanding) regardless of
the disk status.

If you want to force fail because of the existing directory, I suggest
you create a directory and then do the equivalent of 'chmod -w' on it.



> I agree that it would be better to avoid adding yet another public API, but
> svn_io_remove_dir_contents() function might be useful for both Subversion
> and third-party public API clients.

View raw message