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

Re: [PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8

From: Daniel Trebbien <dtrebbien_at_gmail.com>
Date: Fri, 10 Sep 2010 12:24:29 -0700

Note: I was using the GNU Nano repository (svn://svn.sv.gnu.org/nano)
to test my changes, but it's not ideal because the first commit where
the --source-encoding feature is needed is revision 619. Also, as of
now, 29 of the 4518 commits have non-ASCII log messages with 21
encoded in ISO-8859-1 and the rest encoded in UTF-8. Therefore, to
facilitate testing I created a "test" repository.

The test repository (attached) was created with Subversion version
1.6.12 (r955767) on a Debian Squeeze AMD64 system. The repository has
two commits, one made by "alĂ­ce" and the other made by "bob". The
first commit has an `svn:author` revprop that is ISO-8859-1-encoded
and the second has an `svn:log` revprop that is ISO-8859-1-encoded.
After applying my patch and recompiling `svnsync`, QA can test with
the script at: http://pastebin.com/g0n9uqYr

#! /usr/bin/env sh
tar zxvf test.tar.gz
svn log file://`pwd`/test
svnadmin create test_mirror
cat <<'EOF' > test_mirror/hooks/pre-revprop-change
#! /usr/bin/env sh

if [ "$USER" = "svnsync" ]; then exit 0; fi

echo "Only the svnsync user can change revprops" >&2
exit 1
chmod +x test_mirror/hooks/pre-revprop-change
svnsync init --username svnsync \
--source-encoding ISO-8859-1 \
file://`pwd`/test_mirror file://`pwd`/test
svnsync sync --username svnsync \
--source-encoding ISO-8859-1 \
svn log file://`pwd`/test_mirror

Received on 2010-09-10 21:25:25 CEST

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