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

Re: svn commit: r26561 - trunk/subversion/libsvn_wc

From: David James <james_at_cs.toronto.edu>
Date: 2007-09-13 02:13:19 CEST

On 9/12/07, dionisos@tigris.org <dionisos@tigris.org> wrote:
> + /* Then maybe it was a directory? */
> + svn_error_clear(err);
> if (cancel_func)
> SVN_ERR(cancel_func(cancel_baton));
>
> - SVN_ERR(svn_io_remove_dir2(path, FALSE, pool));
> + err = svn_io_remove_dir2(path, FALSE, pool);
>
> - if (cancel_func)
> - SVN_ERR(cancel_func(cancel_baton));
> + if (err)
> + {
> + /* We're unlikely to end up here. But we need this fallback
> + to make sure we report the right error *and* try the
> + correct deletion at least once. */
> + svn_node_kind_t kind;
>
> - break;
> + svn_error_clear(err);
> + SVN_ERR(svn_io_check_path(path, &kind, pool));
> + if (kind == svn_node_file)
> + SVN_ERR(svn_io_remove_file(path, pool));
> + else if (kind == svn_node_dir)
> + {
> + if (cancel_func)
> + SVN_ERR(cancel_func(cancel_baton));

It looks like you changed the cancel func semantics slightly here. Was
this intentional?

Previously, we used the following algorithm:
   - call the cancel func
   - delete the directory
   - if the directory was deleted successfully, call the cancel func
again (presumably to check if the user pressed the cancel button while
we were off deleting a big directory of files)

Now, we use the following algorithm instead:
   - call the cancel func
   - delete the directory
   - if the directory was NOT deleted successfully, call the cancel func again

Cheers,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 13 02:09:51 2007

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.