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

Re: svnsync failure when syncing with a repository that used ISO-8859-1 for log messages

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 9 Sep 2010 19:03:59 +0300

Daniel Trebbien wrote on Thu, Sep 09, 2010 at 08:48:43 -0700:
> On Thu, Sep 9, 2010 at 3:48 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> > Daniel Trebbien wrote on Wed, Sep 08, 2010 at 18:58:06 -0700:
> >> +          if (strcmp(propname, "svn:log") == 0)
> >> +            {
> >
> > Should this use svn_prop_needs_translation()?
>
> Though it does not appear so, the added lines are within the check for
> `svn_prop_needs_translation`.
>

Okay. But my point was really, "shouldn't the new block you're adding
apply to any prop that svn_prop_needs_translation() returns TRUE for,
rather than only for SVN_PROP_REVISION_LOG?"

> >> 1. What is the best way to pass the `log-encoding` option of the
> >> [miscellany] section to the `svnsync_normalize_revprops` function?
> >>
> >
> > What is 'log-encoding' normally used for?  Only for recoding the commit
> > message supplied by an editor, right?  So I'm not sure we should use it
> > here, perhaps a new command-line option will be better.  (svnsync
> > $subcommand --source-encoding=%s)
>
> I like the idea of adding a command line option, so I think that this
> is the way to go.
>
> Do other properties need to be re-encoded, potentially?

That's why I suggested svn_prop_needs_translation(). Have you read its
docstring?

[[[
/** If @a prop_name requires that its value be stored as UTF8/LF in the
 * repository, then return @c TRUE. Else return @c FALSE. This is for
 * users of libsvn_client or libsvn_fs, since it their responsibility
 * to do this translation in both directions. (See
 * svn_subst_translate_string()/svn_subst_detranslate_string() for
 * help with this task.)
 */
svn_boolean_t
svn_prop_needs_translation(const char *prop_name);
]]]

> I was only
> thinking about `svn:log`, but perhaps other properties might need
> re-encoding as well. If not, then I think that the command line option
> should be more specific (e.g.: `--source-log-encoding=%s`).
>

svn:log is certainly the most common case. I think we had very few
reports on users@ of this error occurring with other props (e.g.,
svn:author and svn:externals).

> Another question: which line of code raises the "svnsync: Error while
> replaying commit" error message? I would like to try to make this more
> helpful.

If you build --enable-maintainer-mode, you should get the file-line
coordinates of where the error was raised (and most places that
returned it, too).

Failing that, there's a shortcut that works most of the time: look in
subversion/po/fr.po for "Error while replaying commit" :-)

Daniel
Received on 2010-09-09 18:07:53 CEST

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.