You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/05/06 20:43:55 UTC
svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
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);
+ }
+ return svn_error_return(err);
+ }
/* Run our changes before the subdirectories. We may not have to recurse
if we blow away a subdir. */
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Paul Burba <pt...@gmail.com>.
On Fri, May 6, 2011 at 4:04 PM, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: Paul Burba [mailto:ptburba@gmail.com]
>> Sent: vrijdag 6 mei 2011 21:59
>> To: C. Michael Pilato
>> Cc: dev@subversion.apache.org; pburba@apache.org;
>> commits@subversion.apache.org
>> Subject: Re: svn commit: r1100321 -
>> /subversion/trunk/subversion/libsvn_wc/cleanup.c
>>
>> On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net>
>> wrote:
>> > On 05/06/2011 02:43 PM, pburba@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.
>> >
>> > This is a minor nit, but is it possible to generate this wrapping error in
>> > the client itself? I tend to think of our "suggestive error messages" as
>> > more appropriate when generated in client, which can then use more
>> explicit
>> > terminology:
>> >
>> > Working copy locked; trying running 'svn cleanup' on the root of the
>> > working copy (%s) instead.
>>
>> Done r1100349
>
> The client itself is 'svn', not libsvn_client :)
Ugh, that's what I get for rushing before I head out the door. Will
fix tonight.
> TortoiseSVN has no such option as 'run svn cleanup'.
>
> Bert
>
>
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Paul Burba <pt...@gmail.com>.
On Fri, May 6, 2011 at 4:04 PM, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: Paul Burba [mailto:ptburba@gmail.com]
>> Sent: vrijdag 6 mei 2011 21:59
>> To: C. Michael Pilato
>> Cc: dev@subversion.apache.org; pburba@apache.org;
>> commits@subversion.apache.org
>> Subject: Re: svn commit: r1100321 -
>> /subversion/trunk/subversion/libsvn_wc/cleanup.c
>>
>> On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net>
>> wrote:
>> > On 05/06/2011 02:43 PM, pburba@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.
>> >
>> > This is a minor nit, but is it possible to generate this wrapping error in
>> > the client itself? I tend to think of our "suggestive error messages" as
>> > more appropriate when generated in client, which can then use more
>> explicit
>> > terminology:
>> >
>> > Working copy locked; trying running 'svn cleanup' on the root of the
>> > working copy (%s) instead.
>>
>> Done r1100349
>
> The client itself is 'svn', not libsvn_client :)
Ugh, that's what I get for rushing before I head out the door. Will
fix tonight.
> TortoiseSVN has no such option as 'run svn cleanup'.
>
> Bert
>
>
RE: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Paul Burba [mailto:ptburba@gmail.com]
> Sent: vrijdag 6 mei 2011 21:59
> To: C. Michael Pilato
> Cc: dev@subversion.apache.org; pburba@apache.org;
> commits@subversion.apache.org
> Subject: Re: svn commit: r1100321 -
> /subversion/trunk/subversion/libsvn_wc/cleanup.c
>
> On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net>
> wrote:
> > On 05/06/2011 02:43 PM, pburba@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.
> >
> > This is a minor nit, but is it possible to generate this wrapping error in
> > the client itself? I tend to think of our "suggestive error messages" as
> > more appropriate when generated in client, which can then use more
> explicit
> > terminology:
> >
> > Working copy locked; trying running 'svn cleanup' on the root of the
> > working copy (%s) instead.
>
> Done r1100349
The client itself is 'svn', not libsvn_client :)
TortoiseSVN has no such option as 'run svn cleanup'.
Bert
RE: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Paul Burba [mailto:ptburba@gmail.com]
> Sent: vrijdag 6 mei 2011 21:59
> To: C. Michael Pilato
> Cc: dev@subversion.apache.org; pburba@apache.org;
> commits@subversion.apache.org
> Subject: Re: svn commit: r1100321 -
> /subversion/trunk/subversion/libsvn_wc/cleanup.c
>
> On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net>
> wrote:
> > On 05/06/2011 02:43 PM, pburba@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.
> >
> > This is a minor nit, but is it possible to generate this wrapping error in
> > the client itself? I tend to think of our "suggestive error messages" as
> > more appropriate when generated in client, which can then use more
> explicit
> > terminology:
> >
> > Working copy locked; trying running 'svn cleanup' on the root of the
> > working copy (%s) instead.
>
> Done r1100349
The client itself is 'svn', not libsvn_client :)
TortoiseSVN has no such option as 'run svn cleanup'.
Bert
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Paul Burba <pt...@gmail.com>.
On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 05/06/2011 02:43 PM, pburba@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.
>
> This is a minor nit, but is it possible to generate this wrapping error in
> the client itself? I tend to think of our "suggestive error messages" as
> more appropriate when generated in client, which can then use more explicit
> terminology:
>
> Working copy locked; trying running 'svn cleanup' on the root of the
> working copy (%s) instead.
Done r1100349
Paul
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet <> www.collab.net <> Distributed Development On Demand
>
>
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Paul Burba <pt...@gmail.com>.
On Fri, May 6, 2011 at 2:48 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 05/06/2011 02:43 PM, pburba@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.
>
> This is a minor nit, but is it possible to generate this wrapping error in
> the client itself? I tend to think of our "suggestive error messages" as
> more appropriate when generated in client, which can then use more explicit
> terminology:
>
> Working copy locked; trying running 'svn cleanup' on the root of the
> working copy (%s) instead.
Done r1100349
Paul
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet <> www.collab.net <> Distributed Development On Demand
>
>
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/06/2011 02:43 PM, pburba@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.
This is a minor nit, but is it possible to generate this wrapping error in
the client itself? I tend to think of our "suggestive error messages" as
more appropriate when generated in client, which can then use more explicit
terminology:
Working copy locked; trying running 'svn cleanup' on the root of the
working copy (%s) instead.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Paul Burba <pt...@gmail.com>.
On Fri, May 6, 2011 at 3:26 PM, Greg Stein <gs...@gmail.com> wrote:
> On May 6, 2011 2:44 PM, <pb...@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
Done along with Mike's suggestion to move error from libsvn_wc to
libsvn_client in r1100349
Paul
>> + }
>> + return svn_error_return(err);
>> + }
>>
>> /* Run our changes before the subdirectories. We may not have to recurse
>> if we blow away a subdir. */
>>
>>
>
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by Greg Stein <gs...@gmail.com>.
On May 6, 2011 2:44 PM, <pb...@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. */
>
>
Re: svn commit: r1100321 - /subversion/trunk/subversion/libsvn_wc/cleanup.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/06/2011 02:43 PM, pburba@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.
This is a minor nit, but is it possible to generate this wrapping error in
the client itself? I tend to think of our "suggestive error messages" as
more appropriate when generated in client, which can then use more explicit
terminology:
Working copy locked; trying running 'svn cleanup' on the root of the
working copy (%s) instead.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand