On Wed, Sep 8, 2010 at 4:39 PM, Daniel Trebbien <dtrebb...@gmail.com> wrote: > I think that a call to `svn_subst_translate_string` > (http://svn.collab.net/svn-doxygen/svn__subst_8h.html#a29) needs to be > added in the `svnsync_normalize_revprops` function when `propname` is > "svn:log".
After applying the following patch to `subversion/svnsync/sync.c`, I can confirm that the "svnsync: Error while replaying commit" error disappears, allowing the sync to complete, and that the problem is indeed a log message encoding issue: diff --git a/subversion/svnsync/sync.c b/subversion/svnsync/sync.c index 8f7be9e..c7a5e38 100644 --- a/subversion/svnsync/sync.c +++ b/subversion/svnsync/sync.c @@ -114,6 +114,14 @@ svnsync_normalize_revprops(apr_hash_t *rev_props, /* And count this. */ (*normalized_count)++; } + + if (strcmp(propname, "svn:log") == 0) + { + svn_string_t *new_propval; + SVN_ERR(svn_subst_translate_string(&new_propval, propval, "ISO-8859-1", pool)); + apr_hash_set(rev_props, propname, APR_HASH_KEY_STRING, propval = new_propval); + (*normalized_count)++; + } } } return SVN_NO_ERROR; Here I hard-coded the encoding, but I think that the encoding to use should be retrieved from the Subversion config file. Now the questions are: 1. What is the best way to pass the `log-encoding` option of the [miscellany] section to the `svnsync_normalize_revprops` function? 2. Should `svnsync` always store the log messages in UTF-8 even though the original repository log message encoding is different? 3. Should there be separate configuration options for the log message encoding of the source repository and the log message encoding of the destination repository?