On Tue, 30 Sep 2003, Julian Foad wrote:
> ...
>
> Here is another option. Perhaps auto-properties (both detected and
> configured) don't belong in libsvn_wc but only in
> libsvn_client. svn_wc_add already tries to do too much:
>
> subversion/libsvn_client/copy.c:883: Unfortunately, svn_wc_add() is such a mess that it chokes...
>
> So you should move the detection of MIME type and 'executable' out from
> svn_wc_add into the appropriate caller(s). It seems that there are only
> two callers that need this functionality; they are the two where you
> added a call to svn_client__add_auto_props, in 'add_dir_recursive()' and
> 'add()'.
>
> That would help to clean up svn_wc_add, and also bring the code to
> handle both types of automatic properties together in libsvn_client.
>
> Would that work well?
Yes, that works very well, only one issue remaining: i don't have the
mimetype anymore which is used in the notify_func (f.ex. at the end of
svn_wc_add):
/* Report the addition to the caller. */
if (notify_func != NULL)
(*notify_func) (notify_baton, path, svn_wc_notify_add,
kind,
NULL, <--- this was mimetype
svn_wc_notify_state_unknown,
svn_wc_notify_state_unknown,
SVN_INVALID_REVNUM);
In import_file i can get it back because i have the hash containing the
properties, but in svn_wc_add i can't.
I could make a notify_func which stores the data in a baton and call the
real notify_func after getting the auto-props.
Or is it ok to use always NULL for mimetype ?
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 30 22:42:51 2003