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

Re: Cannot accept 'svn:sync-lock' property because it is not encoded in UTF-8

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 17 Mar 2010 13:25:18 +0200 (Jerusalem Standard Time)

svn:sync-lock is set by svnsync as follows:

  apr_err = apr_gethostname(hostname_str, sizeof(hostname_str), pool);
  mylocktoken = svn_string_createf(pool, "%s:%s", hostname_str,
          /* Except in the very last iteration, try to set the lock. */
          SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNSYNC_PROP_LOCK,
                                         mylocktoken, subpool));

I suppose either _gethostname() or _uuid_generate() return a non-UTF-8
string for you.

For the short term, you could either change the hostname (assuming that's
the problem) or hack svnsync so it generates the lock token differently.
For the long term, we'll have to make sure the 'mylocktoken' is always
valid UTF-8. (e.g., what is the encoding of hostname_str?)


Dmitry Savvateev wrote on Wed, 17 Mar 2010 at 12:40 +0300:
> Yes, I know that, but svn:sync-lock is a system property added by
> svnsync during synchronization, to keep the target repository locked.
> How do I re-encode it?
> 2010/3/17 Ryan Schmidt <subversion-2010a_at_ryandesign.com>:
> > On Mar 17, 2010, at 00:08, Dmitry Savvateev wrote:
> >
> >> I've ran into the following problem with svnsync on Windows Vista.
> >> I'm trying to mirror a repository from my flash drive to the local
> >> disk, and keep getting the following message:
> >>
> >> svnsync: Cannot accept 'svn:sync-lock' property because it is not
> >> encoded in UTF-8
> >>
> >> What's wrong here? I've been doing the same thing many times before,
> >> on Windows and Linux, and never seen anything like this.
> >
> > Subversion requires properties to be UTF-8. This wasn't enforced before, but now is, as of Subversion 1.6.something, I think. If you have non-UTF-8 properties on old revisions, you have to re-encode them to UTF-8 manually.
> >
Received on 2010-03-17 12:25:19 CET

This is an archived mail posted to the Subversion Users mailing list.