S.Ramaswamy wrote:
> "svn_wc_get_ignores" now uses collect_ignore_patterns.
That's good.
>
> Changelog:
>
> Fix issue #2243. Make 'svn add' honor svn:ignore property.
>
> * subversion/include/svn_wc.h
> (svn_wc_get_ignores) : Added function prototype and doc string for
> new function 'svn_wc_get_ignores'.
>
> * subversion/libsvn_wc/status.c
> (svn_wc_get_ignores) : New function to return the default and local
> svn:ignore patterns.
* subversion/include/svn_wc.h
* subversion/libsvn_wc/status.c
(svn_wc_get_ignores): New function.
>
> * subversion/libsvn_client/add.c
> (add_dir_recursive) : Use the new function 'svn_wc_get_ignores' to
> get the default and local svn:ignore patterns.
>
>
>
> ------------------------------------------------------------------------
>
> Index: subversion/include/svn_wc.h
> ===================================================================
> --- subversion/include/svn_wc.h (revision 14700)
> +++ subversion/include/svn_wc.h (working copy)
> @@ -2930,6 +2930,18 @@
> apr_hash_t *config,
> apr_pool_t *pool);
>
> +/** Get the list of ignore patterns from the @c svn_config_t's in the
> + * @a config hash and the local ignore patterns from the directory
> + * in @a adm_access. The default and local ignore patterns are stored in
> + * @a *patterns. Allocate @a *patterns and its contents in @pool.
> + *
> + * @since New in 1.3.
> + */
> +svn_error_t *svn_wc_get_ignores (apr_array_header_t **patterns,
> + apr_hash_t *config,
> + svn_wc_adm_access_t *adm_access,
> + apr_pool_t *pool);
> +
>
> /** Add @a lock to the working copy for @a path. @a adm_access must contain
> * a write lock for @a path. If @a path is read-only, due to locking
> Index: subversion/libsvn_wc/status.c
> ===================================================================
> --- subversion/libsvn_wc/status.c (revision 14700)
> +++ subversion/libsvn_wc/status.c (working copy)
> @@ -1977,3 +1977,18 @@
> /* Return the new hotness. */
> return new_stat;
> }
> +
> +svn_error_t *
> +svn_wc_get_ignores (apr_array_header_t **patterns,
> + apr_hash_t *config,
> + svn_wc_adm_access_t *adm_access,
> + apr_pool_t *pool)
> +{
> + apr_array_header_t *default_ignores;
> +
> + SVN_ERR (svn_wc_get_default_ignores (&default_ignores, config, pool));
> + SVN_ERR (collect_ignore_patterns (*patterns, default_ignores, adm_access,
> + pool));
According to your doc string, this is supposed to allocate *patterns, but it
doesn't.
collect_ignore_patterns has a poor doc string that indicates that it allocates
its array, but it doesn't. It would be best to fix collect_ignore_patterns so
that it does allocate its array, which will simplify its existing point of call ...
> +
> + return SVN_NO_ERROR;
> +}
> Index: subversion/libsvn_client/add.c
> ===================================================================
> --- subversion/libsvn_client/add.c (revision 14700)
> +++ subversion/libsvn_client/add.c (working copy)
> @@ -293,7 +293,8 @@
>
> SVN_ERR (svn_wc_adm_retrieve (&dir_access, adm_access, dirname, pool));
>
> - SVN_ERR (svn_wc_get_default_ignores (&ignores, ctx->config, pool));
> + ignores = apr_array_make (pool, 1, sizeof (const char *));
... and will also simplify this new point of call.
> + SVN_ERR (svn_wc_get_ignores (&ignores, ctx->config, adm_access, pool));
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 3 23:31:02 2005