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

Re: .svnignore functionality

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-10-18 21:32:32 CEST

Mark Benedetto King <bking@answerfriend.com> writes:

> -/* The name of the '.svnignore' file */
> -#define SVN_WC_SVNIGNORE ".svnignore"
> -

This is goodness.

> static svn_error_t *
> -load_ignore_file (const char *dirpath,
> +load_ignore_property (const char *dirpath,
> apr_array_header_t *patterns,
> apr_pool_t *pool)

Good rename.

> + svn_stringbuf_t *file = svn_wc__adm_path( path, 0, pool, SVN_WC__ADM_DIR_PROPS, NULL );
> + svn_stringbuf_t *list;
> + SVN_ERR(svn_wc__load_prop_file (file, props, pool));

Badness. This function should be using the public API to fetch the
property hash for DIRPATH. It doesn't need to go "underground" and
get the actual name of the .svn file; if props are ever stored
elsewhere, this caller shouldn't have to care.

The public API is svn_wc_prop_get(), in include/svn_wc.h. You don't
even need to get the whole prop hash; just look up the one property
name.

>
> + list = (svn_stringbuf_t *) apr_hash_get (props, "svn:ignore", APR_HASH_KEY_STRING);

Let's not put "svn:ignore" directly in there. Instead, define a macro
for it in include/svn_types.h, along with the other reserved svn:
property names.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:45 2006

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.