You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/04/14 16:21:02 UTC
Re: svn commit: r933767 - in /subversion/branches/svn-patch-improvements/subversion:
libsvn_client/patch.c tests/cmdline/patch_tests.py
On Tue, Apr 13, 2010 at 15:45, <st...@apache.org> wrote:
>...
> +++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/patch.c Tue Apr 13 19:45:17 2010
>...
> + /* Finally, delete empty directories. */
> + for (i = 0; i < empty_dirs->nelts; i++)
> + {
> + const char *empty_dir;
> +
> + svn_pool_clear(iterpool);
> +
> + if (ctx->cancel_func)
> + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
> +
> + empty_dir = APR_ARRAY_IDX(empty_dirs, i, const char *);
> + if (ctx->notify_func2)
> + {
> + svn_wc_notify_t *notify;
> +
> + notify = svn_wc_create_notify(empty_dir, svn_wc_notify_delete,
> + iterpool);
> + (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
> + }
> + if (! dry_run)
> + SVN_ERR(svn_wc_delete4(ctx->wc_ctx, empty_dir, FALSE, FALSE,
> + NULL, NULL, /* suppress cancellation */
> + NULL, NULL, /* suppress notification */
> + iterpool));
I can see suppressing notification, but why cancellation?
>...
Cheers,
-g
Re: svn commit: r933767 - in /subversion/branches/svn-patch-improvements/subversion:
libsvn_client/patch.c tests/cmdline/patch_tests.py
Posted by Greg Stein <gs...@gmail.com>.
On Wed, Apr 14, 2010 at 15:53, Stefan Sperling <st...@elego.de> wrote:
> On Wed, Apr 14, 2010 at 12:21:02PM -0400, Greg Stein wrote:
>> On Tue, Apr 13, 2010 at 15:45, <st...@apache.org> wrote:
>> >...
>> > +++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/patch.c Tue Apr 13 19:45:17 2010
>> >...
>> > + /* Finally, delete empty directories. */
>> > + for (i = 0; i < empty_dirs->nelts; i++)
>> > + {
>> > + const char *empty_dir;
>> > +
>> > + svn_pool_clear(iterpool);
>> > +
>> > + if (ctx->cancel_func)
>> > + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
>
> We do it here ^^^
>
>> > +
>> > + empty_dir = APR_ARRAY_IDX(empty_dirs, i, const char *);
>> > + if (ctx->notify_func2)
>> > + {
>> > + svn_wc_notify_t *notify;
>> > +
>> > + notify = svn_wc_create_notify(empty_dir, svn_wc_notify_delete,
>> > + iterpool);
>> > + (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
>> > + }
>> > + if (! dry_run)
>> > + SVN_ERR(svn_wc_delete4(ctx->wc_ctx, empty_dir, FALSE, FALSE,
>> > + NULL, NULL, /* suppress cancellation */
>> > + NULL, NULL, /* suppress notification */
>> > + iterpool));
>>
>> I can see suppressing notification, but why cancellation?
>
> See above.
>
> It's a bit arbitrary how cancellation is done in the patch code.
> It may need a bit of review in this area.
I saw the above, but svn_wc_delete4() also has plenty of loops.
Passing along the cancellation will provide for faster cancellation.
Cheers,
-g
Re: svn commit: r933767 - in
/subversion/branches/svn-patch-improvements/subversion:
libsvn_client/patch.c tests/cmdline/patch_tests.py
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 14, 2010 at 12:21:02PM -0400, Greg Stein wrote:
> On Tue, Apr 13, 2010 at 15:45, <st...@apache.org> wrote:
> >...
> > +++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/patch.c Tue Apr 13 19:45:17 2010
> >...
> > + /* Finally, delete empty directories. */
> > + for (i = 0; i < empty_dirs->nelts; i++)
> > + {
> > + const char *empty_dir;
> > +
> > + svn_pool_clear(iterpool);
> > +
> > + if (ctx->cancel_func)
> > + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
We do it here ^^^
> > +
> > + empty_dir = APR_ARRAY_IDX(empty_dirs, i, const char *);
> > + if (ctx->notify_func2)
> > + {
> > + svn_wc_notify_t *notify;
> > +
> > + notify = svn_wc_create_notify(empty_dir, svn_wc_notify_delete,
> > + iterpool);
> > + (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
> > + }
> > + if (! dry_run)
> > + SVN_ERR(svn_wc_delete4(ctx->wc_ctx, empty_dir, FALSE, FALSE,
> > + NULL, NULL, /* suppress cancellation */
> > + NULL, NULL, /* suppress notification */
> > + iterpool));
>
> I can see suppressing notification, but why cancellation?
See above.
It's a bit arbitrary how cancellation is done in the patch code.
It may need a bit of review in this area.
Stefan
Re: svn commit: r933767 - in
/subversion/branches/svn-patch-improvements/subversion:
libsvn_client/patch.c tests/cmdline/patch_tests.py
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Apr 14, 2010 at 12:21:02PM -0400, Greg Stein wrote:
> On Tue, Apr 13, 2010 at 15:45, <st...@apache.org> wrote:
> >...
> > +++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/patch.c Tue Apr 13 19:45:17 2010
> >...
> > + /* Finally, delete empty directories. */
> > + for (i = 0; i < empty_dirs->nelts; i++)
> > + {
> > + const char *empty_dir;
> > +
> > + svn_pool_clear(iterpool);
> > +
> > + if (ctx->cancel_func)
> > + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
We do it here ^^^
> > +
> > + empty_dir = APR_ARRAY_IDX(empty_dirs, i, const char *);
> > + if (ctx->notify_func2)
> > + {
> > + svn_wc_notify_t *notify;
> > +
> > + notify = svn_wc_create_notify(empty_dir, svn_wc_notify_delete,
> > + iterpool);
> > + (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
> > + }
> > + if (! dry_run)
> > + SVN_ERR(svn_wc_delete4(ctx->wc_ctx, empty_dir, FALSE, FALSE,
> > + NULL, NULL, /* suppress cancellation */
> > + NULL, NULL, /* suppress notification */
> > + iterpool));
>
> I can see suppressing notification, but why cancellation?
See above.
It's a bit arbitrary how cancellation is done in the patch code.
It may need a bit of review in this area.
Stefan