kfogel@collab.net wrote:
> julianfoad@tigris.org writes:
>
>>--- trunk/subversion/include/svn_wc.h (original)
>>+++ trunk/subversion/include/svn_wc.h Tue Jun 7 11:38:36 2005
>>@@ -2974,6 +2974,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, and store them in @a *patterns.
>>+ * Allocate @a *patterns and its contents in @a 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);
>>+
>
> Does this mean that svn_wc_get_default_ignores() should be deprecated
> now, and its doc string should recommend svn_wc_get_ignores instead?
No, I don't think so. It's still useful for (and used by) "import" which by
definition doesn't have any local directory svn:ignore properties to use. We
could update svn_wc_get_ignores() to make its "adm_access" parameter optional,
so that it could be used in places of ..._get_default_ignores(), but I don't
see any compelling reason to do so.
(Side note: I notice that the "config" parameter of svn_wc_get_ignores() and of
svn_wc_get_default_ignores() is optional, but not documented to be so. I'm not
presently intending to document it, as I'm not sure it's necessary. I haven't
investigated.)
>>--- trunk/subversion/libsvn_wc/status.c (original)
>>+++ trunk/subversion/libsvn_wc/status.c Tue Jun 7 11:38:36 2005
>>@@ -520,7 +520,7 @@
>> None of the arguments may be NULL.
>> */
>> static svn_error_t *
>>-collect_ignore_patterns (apr_array_header_t *patterns,
>>+collect_ignore_patterns (apr_array_header_t **patterns,
>> apr_array_header_t *ignores,
>> svn_wc_adm_access_t *adm_access,
>> apr_pool_t *pool)
>>@@ -528,11 +528,13 @@
>> int i;
>> const svn_string_t *value;
>>
>>+ *patterns = apr_array_make (pool, 1, sizeof (const char *));
>>+
>> /* Copy default ignores into the local PATTERNS array. */
>> for (i = 0; i < ignores->nelts; i++)
>> {
>> const char *ignore = APR_ARRAY_IDX (ignores, i, const char *);
>>- APR_ARRAY_PUSH (patterns, const char *) = ignore;
>>+ APR_ARRAY_PUSH (*patterns, const char *) = ignore;
>> }
>
> Why do we even have collect_ignore_patterns() anymore? Shouldn't its
> code just go into svn_wc_get_ignores(), and the one other caller of
> collect_ignore_patterns() would just be adjusted to call
> svn_wc_get_ignores() instead?
Well, presently svn_wc_get_default_ignores() and collect_ignore_patterns() are
called from different places in libsvn_wc/status.c.
svn_wc_get_status_editor2() gets the default ignores and stores them in a
baton, and then get_dir_status() adds them to the local ignores of each
directory in turn that it recurses into. I don't know whether that
implementation gives an important efficiency gain, but presumably that's why it
is like it is.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 7 20:53:54 2005