You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2011/02/13 09:36:27 UTC

Re: [PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8 (v. 5)

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,