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

Re: svn add horkage (and exposing libsvn_wc's ignore functionality)

From: <philip_at_codematters.co.uk>
Date: 2003-01-23 01:48:55 CET

Eric Gillespie epg@pretzelnet.org writes:

 I have many of those files in global-ignores:
 
 global-ignores = *.o *.lo *.la *.al .libs .so* .a #*# .*.rej *.rej .*~ *~ .#*
 
 svn add should not add those files.

Agreed.

 Well, i was going to have a patch with this message, but it looks
 like the ignore functionality is completely hidden in libsvn_wc.
 It looks like it was expected that only svn status would need
 this functionality. At least some of it should be exposed.

svn_client_delete already uses it, but it cheats, it gets it via
svn_wc_status.

 I was going to add a test to see if the item is to be ignored in
 libsvn_client/add.c:add_dir_recursive right after the check for
 '.svn', '.', and '..'. But to do that i need a function like
 svn_wc_is_ignored.

What sort of interface were you thinking of? The obvious

svn_error_t *
svn_wc_is_ignored(const char *path,
                  svn_boolean_t *ignored,
                  apr_pool_t *pool);

will involve parsing the config file for each individual path. That's
not a huge problem, but it is unfortunate. Possibly something like

svn_error_t *
svn_wc_is_ignored(apr_array_header_t *paths,
                  apr_array_header_t **ignored,
                  apr_pool_t *pool);

would be better. Or perhaps

svn_error_t *
svn_wc_get_ignores(apr_array_header_t *ignores,
                   apr_pool_t *pool);

svn_boolean_t
svn_wc_is_ignored(const char *path,
                  apr_array_header_t *ignores,
                  apr_pool_t *pool);

This is yet another problem that could be solved by some sort of
svn_context_t context parameter passed to all client/wc functions.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:08:03 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.