Author: pburba Date: Mon May 9 13:54:04 2011 New Revision: 1101028 URL: http://svn.apache.org/viewvc?rev=1101028&view=rev Log: Follow-up to r1100349, move error for issue #3835 from libsvn_client to svn.
* subversion/libsvn_client/cleanup.c (svn_client_cleanup): Fix last Friday's brain cramp: Revert r1100349, moving error to the the *real* client... * subversion/svn/cleanup-cmd.c (): ...here. See http://svn.haxx.se/dev/archive-2011-05/0179.shtml Modified: subversion/trunk/subversion/libsvn_client/cleanup.c subversion/trunk/subversion/svn/cleanup-cmd.c Modified: subversion/trunk/subversion/libsvn_client/cleanup.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cleanup.c?rev=1101028&r1=1101027&r2=1101028&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/cleanup.c (original) +++ subversion/trunk/subversion/libsvn_client/cleanup.c Mon May 9 13:54:04 2011 @@ -59,23 +59,6 @@ svn_client_cleanup(const char *path, err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, scratch_pool); - if (err && err->apr_err == SVN_ERR_WC_LOCKED) - { - const char *wcroot_abspath; - svn_error_t *err2 = svn_wc_get_wc_root(&wcroot_abspath, ctx->wc_ctx, - local_abspath, scratch_pool, - scratch_pool); - if (err2) - err = svn_error_compose_create(err, err2); - else - err = svn_error_createf(SVN_ERR_WC_LOCKED, err, - _("Working copy locked; trying running " - "'svn cleanup' on the root of the working " - "copy (%s) instead."), - svn_dirent_local_style(wcroot_abspath, - scratch_pool)); - } - svn_io_sleep_for_timestamps(path, scratch_pool); return svn_error_return(err); } Modified: subversion/trunk/subversion/svn/cleanup-cmd.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cleanup-cmd.c?rev=1101028&r1=1101027&r2=1101028&view=diff ============================================================================== --- subversion/trunk/subversion/svn/cleanup-cmd.c (original) +++ subversion/trunk/subversion/svn/cleanup-cmd.c Mon May 9 13:54:04 2011 @@ -74,10 +74,38 @@ svn_cl__cleanup(apr_getopt_t *os, for (i = 0; i < targets->nelts; i++) { const char *target = APR_ARRAY_IDX(targets, i, const char *); + svn_error_t *err; svn_pool_clear(subpool); SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton)); - SVN_ERR(svn_client_cleanup(target, ctx, subpool)); + err = svn_client_cleanup(target, ctx, subpool); + if (err && err->apr_err == SVN_ERR_WC_LOCKED) + { + const char *target_abspath; + svn_error_t *err2 = svn_dirent_get_absolute(&target_abspath, + target, subpool); + if (err2) + { + err = svn_error_compose_create(err, err2); + } + else + { + const char *wcroot_abspath; + + err2 = svn_wc_get_wc_root(&wcroot_abspath, ctx->wc_ctx, + target_abspath, subpool, subpool); + if (err2) + err = svn_error_compose_create(err, err2); + else + err = svn_error_createf(SVN_ERR_WC_LOCKED, err, + _("Working copy locked; trying running " + "'svn cleanup' on the root of the " + "working copy (%s) instead."), + svn_dirent_local_style(wcroot_abspath, + subpool)); + } + } + SVN_ERR(err); } svn_pool_destroy(subpool);