[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 6 May 2011 15:26:55 -0400

On May 6, 2011 2:44 PM, <pburba_at_apache.org> wrote:
>
> Author: pburba
> Date: Fri May 6 18:43:55 2011
> New Revision: 1100321
>
> URL: http://svn.apache.org/viewvc?rev=1100321&view=rev
> Log:
> Fix issue #3835
>
> * subversion/libsvn_wc/cleanup.c
>
> (cleanup_internal): If the cleanup target is locked locked indirectly via
a
> recursive lock on an ancestor, then recommend cleaning up the entire WC.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/cleanup.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/cleanup.c
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/cleanup.c?rev=1100321&r1=1100320&r2=1100321&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/cleanup.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/cleanup.c Fri May 6 18:43:55
2011
> @@ -142,13 +142,32 @@ cleanup_internal(svn_wc__db_t *db,
> {
> int wc_format;
> const char *cleanup_abspath;
> + svn_error_t *err;
>
> /* Can we even work with this directory? */
> SVN_ERR(can_be_cleaned(&wc_format, db, dir_abspath, scratch_pool));
>
> - /* ### This fails if ADM_ABSPATH is locked indirectly via a
> - ### recursive lock on an ancestor. */
> - SVN_ERR(svn_wc__db_wclock_obtain(db, dir_abspath, -1, TRUE,
scratch_pool));
> + /* Issue #3835: If DIR_ABSPATH is locked indirectly via a recursive
lock
> + on an ancestor, then recommend cleaning up the entire WC. */
> + err = svn_wc__db_wclock_obtain(db, dir_abspath, -1, TRUE,
scratch_pool);
> + if (err)
> + {
> + if (err->apr_err == SVN_ERR_WC_LOCKED)
> + {
> + const char *wcroot_abspath;
> + svn_error_t *err2 = svn_wc__db_get_wcroot(&wcroot_abspath, db,
> + dir_abspath,
> + scratch_pool,
> + scratch_pool);
> + if (err2)
> + return svn_error_compose_create(err, err2);
> +
> + return svn_error_createf(SVN_ERR_WC_LOCKED, err,
> + _("Try cleanup from root of working
copy "
> + "'%s'"), wcroot_abspath,
scratch_pool);

Need local style on that path

> + }
> + return svn_error_return(err);
> + }
>
> /* Run our changes before the subdirectories. We may not have to recurse
> if we blow away a subdir. */
>
>
Received on 2011-05-06 21:27:24 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.