s...@apache.org wrote on Thu, Jun 27, 2013 at 13:59:59 -0000:
> Author: stsp
> Date: Thu Jun 27 13:59:58 2013
> New Revision: 1497359
> 
> URL: http://svn.apache.org/r1497359
> Log:
> Add support for cleaning up externals via 'svn cleanup --include-externals'.
> 
> +++ subversion/trunk/subversion/libsvn_client/cleanup.c Thu Jun 27 13:59:58 
> 2013
> @@ -44,27 +44,132 @@
> +static svn_error_t *
> +do_cleanup(const char *local_abspath,
> +           svn_boolean_t include_externals,
> +           svn_boolean_t remove_unversioned_items,
> +           svn_boolean_t remove_ignored_items,
> +           svn_client_ctx_t *ctx,
> +           apr_pool_t *scratch_pool)
> +{
> +  if (remove_unversioned_items || remove_ignored_items || include_externals)
> +    {
> +      struct cleanup_status_walk_baton b;
> +
> +      b.include_externals = include_externals;
> +      b.remove_unversioned_items = remove_unversioned_items;
> +      b.remove_ignored_items = remove_ignored_items;
> +      b.include_externals = include_externals;
> +      b.ctx = ctx;
> +      SVN_ERR(svn_wc_walk_status(ctx->wc_ctx, local_abspath,
> +                                 svn_depth_infinity,
> +                                 TRUE,  /* get all */
> +                                 remove_ignored_items,
> +                                 TRUE,  /* ignore textmods */
> +                                 NULL,  /* use default ignore patterns */

That uses the compile-time-default ignore patterns even if the user has
changed them.

% rm -rf ~/.subversion
% touch foo.o
% svn st
% svn st --no-ignore
I       foo.o
% svn st --config-option=config:miscellany:global-ignores=
?       foo.o
% $svn st 
% $svn st --no-ignore
I       foo.o
% $svn st --config-option=config:miscellany:global-ignores=
?       foo.o
% $svn cleanup --remove-ignored 
--config-option=config:miscellany:global-ignores=
D         foo.o
% 

I would expect foo.o not to be deleted under --remove-ignored since it
does not match any ignore pattern in the config or properties in effect.
I would expect it to be deleted under --remove-unversioned (I didn't
test this).

Daniel


> +                                 cleanup_status_walk, &b,
> +                                 ctx->cancel_func,
> +                                 ctx->cancel_baton,
> +                                 scratch_pool));
> +    }
> +
> +  return SVN_NO_ERROR;
> +}

Reply via email to