Malcolm Rowe writes:
> On Thu, Feb 08, 2007 at 01:13:40AM -0800, firstname.lastname@example.org wrote:
> > Make 'svn cleanup' not fail on a missing .svn/tmp directory. It is
> > removed and rebuilt anyway so failing if it does not exist is
> > counterproductive.
> > Patch by: Henner Zeller <email@example.com>
> > * subversion/include/svn_io.h
> > (svn_io_remove_dir2): New function. Add ignore_enoent flag.
> > (svn_io_remove_dir): Deprecate. All callers updated to use
> > svn_io_remove_dir2.
> > * subversion/libsvn_subr/io.c
> > (svn_io_remove_dir2): Copy from svn_io_remove_dir, adding ignore_enoent
> > parameter.
> > (svn_io_remove_dir): Wrap svn_io_remove_dir2.
> > [...]
> > Modified:
> > trunk/subversion/include/svn_io.h
> > trunk/subversion/libsvn_client/add.c
> > trunk/subversion/libsvn_fs_base/fs.c
> > trunk/subversion/libsvn_fs_fs/fs.c
> > trunk/subversion/libsvn_fs_fs/fs_fs.c
> > trunk/subversion/libsvn_repos/repos.c
> > trunk/subversion/libsvn_subr/io.c
> > trunk/subversion/libsvn_wc/adm_files.c
> > trunk/subversion/libsvn_wc/adm_ops.c
> > trunk/subversion/libsvn_wc/lock.c
> > trunk/subversion/tests/cmdline/basic_tests.py
> > trunk/subversion/tests/cmdline/svntest/actions.py
> > trunk/subversion/tests/svn_test_main.c
> The log message seems to be missing most of the changes to libsvn_*/.
> While most of them are just 'update callers', I would have thought you'd
> mention the change in libsvn_wc/adm_files.c where the key part of this
> change was made.
Of course. I accidentally removed two lines too much from the original
log message;) Fixed.
> More importantly, though, I'm not sure that the API change to
> svn_io_remove_dir() is appropriate. Is there any reason that the single
> caller who wishes to ignore ENOENT can't simply ignore that error?
The difference is that the new function let's make sure that the directory
actually doesn't exist afterwards. In general, we could have an ENOENT
further down in the tree and in that case, ignoring the error would leave
a half-removed directory. I think this behaviour can be more generally useful
in cleanup actions, hence the new API.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Feb 8 11:55:16 2007