Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Sergey Raevskiy
After a little discussion with Daniel on IRC I've decided to use 'compatible-version' approach. Setting 'compatible-version' to 1.0.0 should force to fail creation of new FSFS filesystem, since it first appeared in Subversion 1.1. This should also be true for FSX (or any other hypothetical backen

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Sergey Raevskiy
Thanks for the reviews! > 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. Unfortunately, making the directory unwritable will cause svn_repos_create() to fail *before* attempting the FS creation and th

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Branko Čibej
On 01.04.2015 12:37, Daniel Shahaf wrote: > Julian Foad wrote on Wed, Apr 01, 2015 at 11:30:22 +0100: >> Daniel, Brane: >> >> As I understand it, Sergey isn't trying to fix an issue that's >> specifically related to a wrong FS type being given. He's fixing the >> "roll-back" code that kicks in if r

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Daniel Shahaf
Julian Foad wrote on Wed, Apr 01, 2015 at 11:30:22 +0100: > Daniel, Brane: > > As I understand it, Sergey isn't trying to fix an issue that's > specifically related to a wrong FS type being given. He's fixing the > "roll-back" code that kicks in if repo creation fails for *any* > reason, and wrong

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Julian Foad
Daniel, Brane: As I understand it, Sergey isn't trying to fix an issue that's specifically related to a wrong FS type being given. He's fixing the "roll-back" code that kicks in if repo creation fails for *any* reason, and wrong-fs-type is just an example of one particular reason that can trigger

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-04-01 Thread Daniel Shahaf
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 th

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-03-31 Thread Sergey Raevskiy
> 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

Re: [PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-03-30 Thread Branko Čibej
On 30.03.2015 15:35, Sergey Raevskiy wrote: > Hi! > > I've noticed inconsistency in svn_repos_create() behavior. Despite the fact > that creation of repositories over empty directories is allowed, in some cases > this function will remove an empty directory that existed before repository > creatio

[PATCH] Don't remove empty directories when creating repositories (in some cases)

2015-03-30 Thread Sergey Raevskiy
Hi! I've noticed inconsistency in svn_repos_create() behavior. Despite the fact that creation of repositories over empty directories is allowed, in some cases this function will remove an empty directory that existed before repository creation. I've attached the patch with test and fix. [[[ Whe