[[[ Add a command line option (--source-prop-encoding) to the svnsync init, sync, and copy-revprops subcommands that allows the user to specify the character encoding of translatable properties from the source repository. This is needed to allow svnsync to sync some older Subversion repositories that have properties that were not encoded in UTF-8. As discussed at: http://thread.gmane.org/gmane.comp.version-control.subversion.user/100020 http://thread.gmane.org/gmane.comp.version-control.subversion.devel/122518 http://thread.gmane.org/gmane.comp.version-control.subversion.devel/122550 http://thread.gmane.org/gmane.comp.version-control.subversion.devel/124731 http://thread.gmane.org/gmane.comp.version-control.subversion.devel/125057 http://thread.gmane.org/gmane.comp.version-control.subversion.devel/125783 Most of the changes exist to pass the argument to --source-prop-encoding through to the functions that need it (mainly normalize_string() in subversion/svnsync/sync.c). * subversion/svnsync/main.c (svnsync__opt) Add svnsync_opt_source_encoding. (svnsync_cmd_table): Add svnsync_opt_source_encoding to the list of acceptable options for the init, sync, and copy-revprops subcommands. (svnsync_options): Add a description of the --source-prop-encoding option. (opt_baton_t, subcommand_baton_t): Add the SOURCE_PROP_ENCODING field. (log_properties_normalized): Document the QUIET parameter. (copy_revprops): Add the SOURCE_PROP_ENCODING parameter. Pass it through to svnsync_normalize_revprops(). (make_subcommand_baton): Set the SOURCE_PROP_ENCODING field of the resulting subcommand_baton_t object to the value of SOURCE_PROP_ENCODING from the opt_baton_t object. (do_initialize, do_synchronize, do_copy_revprops, replay_rev_started, replay_rev_finished): Pass SOURCE_PROP_ENCODING to svnsync_* functions and copy_revprops(). (main): Handle the case when the command line option is --source-prop-encoding. Set the SOURCE_PROP_ENCODING field of the opt_baton_t object to either OPT_ARG or NULL. * subversion/svnsync/sync.c (normalize_string): Add the SOURCE_PROP_ENCODING parameter. Always call svn_subst_translate_string2(). Switch to the "two pools" (result & scratch pools) pattern. (svnsync_normalize_revprops): Add the SOURCE_PROP_ENCODING parameter. Pass the value through to normalize_string(). (edit_baton_t): Add the SOURCE_PROP_ENCODING field. (change_file_prop, change_dir_prop): Pass SOURCE_PROP_ENCODING from the edit baton to normalize_string(). (svnsync_get_sync_editor): Add the SOURCE_PROP_ENCODING parameter. * subversion/svnsync/sync.h (svnsync_normalize_revprops): Add the SOURCE_PROP_ENCODING parameter. Update the documentation of the function. (svnsync_get_sync_editor): Add the SOURCE_PROP_ENCODING parameter. Update the documentation of the function. * subversion/tests/cmdline/svnrdump_tests.py (copy_bad_line_endings2_dump): New test case. (test_list): Add copy_bad_line_endings2_dump. * subversion/tests/cmdline/svnsync_tests.py (run_sync): Add the SOURCE_PROP_ENCODING parameter. Build up the command line arguments to `svnsync synchronize`. (run_copy_revprops): Add the SOURCE_PROP_ENCODING parameter. Build up the command line arguments to `svnsync copy-revprops`. (run_init): Add the SOURCE_PROP_ENCODING parameter. Build up the command line arguments to `svnsync initialize`. (setup_and_sync): Add the SOURCE_PROP_ENCODING parameter. Pass the value through to run_init(), run_sync(), and run_copy_revprops(). (run_test): Add the SOURCE_PROP_ENCODING parameter. Pass the value through to setup_and_sync(). (copy_bad_line_endings2): New test case. (copy_bad_encoding): New test case. (identity_copy): New test case. (test_list): Add copy_bad_line_endings2, copy_bad_encoding, and identity_copy. * subversion/tests/cmdline/svnrsync_tests_data/copy-bad-line-endings2.dump A dump of a repository with the following features: 1. The log message (`svn:log` revision property) of revision 1 has CRLF line endings. 2. The log message of revision 2 has CR line endings. 3. Revision 3 introduces an `svn:ignore` node property with CRLF line endings. 4. Revision 4 introduces a custom node property, `x:related-to`, with CRLF line endings. * subversion/tests/cmdline/svnrsync_tests_data/ copy-bad-line-endings2.expected.dump A dump of the expected result of using svnrdump to dump copy-bad-line-endings2.dump. * subversion/tests/cmdline/svnsync_tests_data/copy-bad-encoding.dump A dump of a repository with the following feature: The log message and an `svn:ignore` node prop of revision 1 are encoded in ISO-8859-3. * subversion/tests/cmdline/svnsync_tests_data/copy-bad-encoding.expected.dump A dump of the expected result of using svnsync to sync copy-bad-encoding.dump with `--source-prop-encoding ISO-8859-3`. * subversion/tests/cmdline/svnsync_tests_data/copy-bad-line-endings2.dump Copy of ../svnrsync_tests_data/copy-bad-line-endings2.dump. * subversion/tests/cmdline/svnsync_tests_data/ copy-bad-line-endings2.expected.dump A dump of the expected result of using svnsync to sync copy-bad-line-endings2.dump. ]]]