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

Re: [PATCH] Issue #2243 - 'svn add' command not keying off svn:ignore value

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-05-10 12:23:54 CEST

S.Ramaswamy wrote:

>Changelog:
>
>Make 'svn add' honor svn:ignore property
>
>* subversion/libsvn_client/add.c
> (add_dir_recursive) : Add list of local ignores to default ignores
> list.
>
>
If you're fixing an issue, you should say so in the log message.

>Index: subversion/libsvn_client/add.c
>===================================================================
>--- subversion/libsvn_client/add.c (revision 14667)
>+++ subversion/libsvn_client/add.c (working copy)
>@@ -276,6 +276,7 @@
> apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
> svn_wc_adm_access_t *dir_access;
> apr_array_header_t *ignores;
>+ const svn_string_t *value;
>
>
"value"? That's not a very descriptive name. Something like
"local_ignores" or "dir_ignores" would be more appropriate.

> /* Check cancellation; note that this catches recursive calls too. */
> if (ctx->cancel_func)
>@@ -294,6 +295,12 @@
> SVN_ERR (svn_wc_adm_retrieve (&dir_access, adm_access, dirname, pool));
>
> SVN_ERR (svn_wc_get_default_ignores (&ignores, ctx->config, pool));
>+ /* Add local svn:ignore globs to default ignores */
>+ SVN_ERR (svn_wc_prop_get (&value, SVN_PROP_IGNORE,
>+ svn_wc_adm_access_path (adm_access), adm_access,
>+ pool));
>+ if (value != NULL)
>+ svn_cstring_split_append (ignores, value->data, "\n\r", FALSE, pool);
>
> /* Create a subpool for iterative memory control. */
> subpool = svn_pool_create (pool);
>
>
It would be better to add a new function, svn_wc_get_ignores, that
returns the combined default and per-directory ignores list. The fact
that you copied this bit of code from
libsvn_wc/status.c:collec_ignore_patterns isn't exactly a good thing,
either -- we try to avoid code duplication where possible.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 10 12:24:47 2005

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.