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
> 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
> * subversion/libsvn_subr/io.c
> (svn_io_remove_dir2): Copy from svn_io_remove_dir, adding ignore_enoent
> (svn_io_remove_dir): Wrap svn_io_remove_dir2.
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.
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?
In other words, can we avoid the addition of what (to me) appears to be
a very specific feature in the API and just do something like this
(untested, and we should probably also document svn_io_remove_dir()'s
return in its doc-comments).
(svn_wc__adm_cleanup_tmp_area): Don't raise an error if the directory
is already missing.
--- subversion/libsvn_wc/adm_files.c (revision 23341)
+++ subversion/libsvn_wc/adm_files.c (working copy)
@@ -1216,13 +1216,18 @@ svn_wc__adm_cleanup_tmp_area(svn_wc_adm_
const char *tmp_path;
+ svn_error_t *err;
/* Get the path to the tmp area, and blow it away. */
tmp_path = extend_with_adm_name(svn_wc_adm_access_path(adm_access),
NULL, 0, pool, SVN_WC__ADM_TMP, NULL);
- SVN_ERR(svn_io_remove_dir(tmp_path, pool));
+ err = svn_io_remove_dir(tmp_path, pool);
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
/* Now, rebuild the tmp area. */
Received on Thu Feb 8 11:39:38 2007
- application/pgp-signature attachment: stored