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

Re: [PATCH]: Let users cancel out of command line client immediately if they signal 3 times

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-03-14 15:20:12 CET

Daniel Berlin <dberlin@dberlin.org> writes:

> On Mon, 2006-03-13 at 19:43 -0500, Greg Hudson wrote:
>> On Mon, 2006-03-13 at 08:58 -0500, Daniel Berlin wrote:
>> > We can't make every expensive operation cancellable without needing
>> > cleanup afterwards, and don't do so anyway. Commit will leave locks,
>> > for example.
>>
>> It will?
>
> Yup.
>
> dberlin@linux:/mnt/gccstuff/gcc-clean/gcc> svn commit
> svn: Caught signal
> dberlin@linux:/mnt/gccstuff/gcc-clean/gcc> svn commit
> svn: Working copy
> '/mnt/gccstuff/gcc-clean/gcc/testsuite/gcc.c-torture/execute/builtins/lib' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> details)
> dberlin@linux:/mnt/gccstuff/gcc-clean/gcc>

That looks like a bug, the only locks that get left behind should be
those protecting log files. It's probably this:

Index: subversion/libsvn_wc/lock.c
===================================================================
--- subversion/libsvn_wc/lock.c (revision 18867)
+++ subversion/libsvn_wc/lock.c (working copy)
@@ -512,7 +512,16 @@
 
           /* See if someone wants to cancel this operation. */
           if (cancel_func)
- SVN_ERR(cancel_func(cancel_baton));
+ {
+ err = cancel_func(cancel_baton);
+ if (err)
+ {
+ /* This closes all the children in temporary hash as well */
+ svn_error_clear(svn_wc_adm_close(lock));
+ svn_pool_destroy(subpool);
+ return err;
+ }
+ }
 
           apr_hash_this(hi, NULL, NULL, &val);
           entry = val;

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 14 15:23:09 2006

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.