You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Danny Trebbien <dt...@gmail.com> on 2011/02/13 03:17:30 UTC
[PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8
(v. 5)
Attached are version 5 of the patch and log message. The six DUMP
files are the same, and TGZ archives of these files can be downloaded
from Gmane: http://cache.gmane.org//gmane/comp/version-control/subversion/devel/125057-001.bin
and http://cache.gmane.org//gmane/comp/version-control/subversion/devel/125057-002.bin
There was a slight problem with v. 4 of the patch that had something
to do with the concern raised in a message from January 10, 2011:
<http://thread.gmane.org/gmane.comp.version-control.subversion.devel/124731/focus=124967>.
The issue was that `svnsync` would fail to sync Subversion
repositories containing UTF-8-encoded svn:* props if the
system-default language encoding is not UTF-8. The fix was to not
pass NULL for ENCODING to svn_subst_translate_string2():
https://github.com/dtrebbien/subversion/commit/76b6856818553b9bc62a3c7c7fd2aa084ed1a3e1
Version 5 of the patch also adds a test that `svnsync` can sync
repositories containing UTF-8-encoded svn:* props even if the
system-default language encoding is not UTF-8.
Re: [PATCH] allow svnsync to translate non-UTF-8 log messages to
UTF-8 (v. 5)
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Danny Trebbien wrote on Sat, Feb 12, 2011 at 18:17:30 -0800:
> +def identity_copy(sbox):
> + "copy UTF-8 svn:* props identically"
> + orig_lc_all = locale.setlocale(locale.LC_ALL)
> + other_locales = [ "English.1252", "German.1252", "French.1252", "en_US.ISO-8859-1", "en_GB.ISO-8859-1", "de_DE.ISO-8859-1" ]
> + for other_locale in other_locales:
> + try:
> + locale.setlocale(locale.LC_ALL, other_locale)
> + break
> + except:
> + pass
Don't you need to check that at least one of the six locales was
set successfully?
> + run_test(sbox, "copy-bad-encoding.expected.dump",
> + exp_dump_file_name="copy-bad-encoding.expected.dump",
> + bypass_prop_validation=True)
> +
> + locale.setlocale(locale.LC_ALL, orig_lc_all)
> +
> #----------------------------------------------------------------------
>
> def delete_svn_props(sbox):
> @@ -912,6 +958,9 @@ test_list = [ None,
> info_synchronized,
> info_not_synchronized,
> copy_bad_line_endings,
> + copy_bad_line_endings2,
> + copy_bad_encoding,
> + identity_copy,
> delete_svn_props,
> commit_a_copy_of_root,
> descend_into_replace,