You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <da...@elego.de> on 2013/06/27 16:18:09 UTC
Re: svn commit: r1497359 - in /subversion/trunk/subversion:
include/svn_client.h include/svn_wc.h libsvn_client/cleanup.c
libsvn_client/deprecated.c svn/cleanup-cmd.c svn/notify.c svn/svn.c
tests/cmdline/wc_tests.py
stsp@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;
> +}
Re: svn commit: r1497359 - in /subversion/trunk/subversion:
include/svn_client.h include/svn_wc.h libsvn_client/cleanup.c
libsvn_client/deprecated.c svn/cleanup-cmd.c svn/notify.c svn/svn.c
tests/cmdline/wc_tests.py
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jun 27, 2013 at 08:36:40PM +0300, Daniel Shahaf wrote:
> Stefan Sperling wrote on Thu, Jun 27, 2013 at 17:28:45 +0200:
> > On Thu, Jun 27, 2013 at 05:18:09PM +0300, Daniel Shahaf wrote:
> > > That uses the compile-time-default ignore patterns even if the user has
> > > changed them.
> >
> > Thanks, should be fixed as of r1497395.
>
> Thanks! But now the opposite problem happens: --remove-unversioned does
> not remove the foo.o file:
>
> % ls
> foo.o
> % $svn cleanup --remove-unversioned --config-option=config:miscellany:global-ignores=
> % $svn status --config-option=config:miscellany:global-ignores=
> ? foo.o
Oh, right. Fixed in r1497487. Thanks again!
Re: svn commit: r1497359 - in /subversion/trunk/subversion:
include/svn_client.h include/svn_wc.h libsvn_client/cleanup.c
libsvn_client/deprecated.c svn/cleanup-cmd.c svn/notify.c svn/svn.c
tests/cmdline/wc_tests.py
Posted by Daniel Shahaf <da...@elego.de>.
Stefan Sperling wrote on Thu, Jun 27, 2013 at 17:28:45 +0200:
> On Thu, Jun 27, 2013 at 05:18:09PM +0300, Daniel Shahaf wrote:
> > That uses the compile-time-default ignore patterns even if the user has
> > changed them.
>
> Thanks, should be fixed as of r1497395.
Thanks! But now the opposite problem happens: --remove-unversioned does
not remove the foo.o file:
% ls
foo.o
% $svn cleanup --remove-unversioned --config-option=config:miscellany:global-ignores=
% $svn status --config-option=config:miscellany:global-ignores=
? foo.o
Re: svn commit: r1497359 - in /subversion/trunk/subversion:
include/svn_client.h include/svn_wc.h libsvn_client/cleanup.c
libsvn_client/deprecated.c svn/cleanup-cmd.c svn/notify.c svn/svn.c
tests/cmdline/wc_tests.py
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jun 27, 2013 at 05:18:09PM +0300, Daniel Shahaf wrote:
> That uses the compile-time-default ignore patterns even if the user has
> changed them.
Thanks, should be fixed as of r1497395.