I spent the past weekend reading though the every line of
svnsync/main.c on paper. This was a great help. I've made good
progress on patching #3404. I *think* I've finished something
submittable, but I need to let it sit a day and then run it through a
few test scenarios before I post it. In the meantime, perhaps you
could clear something up for me:
Can I call apr_hash_set in this way during traversal, or is this a Bad Thing?
/* normalize the eol-style of the values of those svn: properties in
in rev_props which need_translation. */
static svn_error_t *
normalize_revprop_eol_style(apr_hash_t *rev_props, apr_pool_t *pool)
{
apr_hash_index_t *hi;
for (hi = apr_hash_first(pool, rev_props);
hi;
hi = apr_hash_next(hi))
{
const void *key;
void *val;
apr_hash_this(hi, &key, NULL, &val);
if (svn_prop_needs_translation(key))
{
SVN_ERR(normalize_svn_string_eol_style((const svn_string_t **)&val,
pool));
/* http://apr.apache.org/docs/apr/0.9/group__apr__hash.html
doesn't say if it's safe to replace the value of an
already present key. Here's hoping that it is... */
apr_hash_set(rev_props, key, APR_HASH_KEY_STRING, val);
}
}
return SVN_NO_ERROR;
}
// Ben
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1951259
Received on 2009-04-27 22:11:52 CEST