You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/04/13 20:42:30 UTC
svn commit: r1091881 -
/subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c
Author: stsp
Date: Wed Apr 13 18:42:30 2011
New Revision: 1091881
URL: http://svn.apache.org/viewvc?rev=1091881&view=rev
Log:
On the 1.6.x-issue-3853 branch:
* subversion/libsvn_wc/log.c
(cleanup_interal): Copied from svn_wc_cleanup2(), but with a new paramter
'already_recursing'. If recursing into subdirs, this function calls
itself with already_recursing set to TRUE. Do not throw an error if an
unversioned directory is encountered during recursion, fixing issue #3853.
(svn_wc_cleanup2): Just call cleanup_internal() with already_recursing
set to FALSE.
Modified:
subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c
Modified: subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c?rev=1091881&r1=1091880&r2=1091881&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c (original)
+++ subversion/branches/1.6.x-issue3853/subversion/libsvn_wc/log.c Wed Apr 13 18:42:30 2011
@@ -2501,12 +2501,14 @@ svn_wc_cleanup(const char *path,
return svn_wc_cleanup2(path, diff3_cmd, cancel_func, cancel_baton, pool);
}
-svn_error_t *
-svn_wc_cleanup2(const char *path,
- const char *diff3_cmd,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *pool)
+
+static svn_error_t *
+cleanup_internal(const char *path,
+ const char *diff3_cmd,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_boolean_t already_recursing,
+ apr_pool_t *pool)
{
apr_hash_t *entries = NULL;
apr_hash_index_t *hi;
@@ -2525,10 +2527,18 @@ svn_wc_cleanup2(const char *path,
/* a "version" of 0 means a non-wc directory */
if (wc_format_version == 0)
- return svn_error_createf
- (SVN_ERR_WC_NOT_DIRECTORY, NULL,
- _("'%s' is not a working copy directory"),
- svn_path_local_style(path, pool));
+ {
+ /* If we've been asked to cleanup a non-working copy, bail out.
+ * But if this directory is simply found missing during recursion,
+ * silently ignore it. */
+ if (already_recursing)
+ return SVN_NO_ERROR;
+ else
+ return svn_error_createf
+ (SVN_ERR_WC_NOT_DIRECTORY, NULL,
+ _("'%s' is not a working copy directory"),
+ svn_path_local_style(path, pool));
+ }
/* Lock this working copy directory, or steal an existing lock */
SVN_ERR(svn_wc__adm_steal_write_lock(&adm_access, NULL, path, pool));
@@ -2554,8 +2564,9 @@ svn_wc_cleanup2(const char *path,
/* Sub-directories */
SVN_ERR(svn_io_check_path(entry_path, &kind, subpool));
if (kind == svn_node_dir)
- SVN_ERR(svn_wc_cleanup2(entry_path, diff3_cmd,
- cancel_func, cancel_baton, subpool));
+ SVN_ERR(cleanup_internal(entry_path, diff3_cmd,
+ cancel_func, cancel_baton,
+ TRUE, subpool));
}
else
{
@@ -2598,3 +2609,15 @@ svn_wc_cleanup2(const char *path,
return svn_wc_adm_close2(adm_access, pool);
}
+
+svn_error_t *
+svn_wc_cleanup2(const char *path,
+ const char *diff3_cmd,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *pool)
+{
+ return cleanup_internal(path, diff3_cmd, cancel_func, cancel_baton,
+ FALSE, pool);
+
+}