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

Re: svn commit: r17566 - in branches/ebcdic/trunk/subversion: tests tests/libsvn_repos

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-12-09 02:33:27 CET

pburba@tigris.org writes:

> Author: pburba
> Date: Wed Nov 30 10:15:58 2005
> New Revision: 17566
>
> Modified:
> branches/ebcdic/trunk/subversion/libsvn_subr/opt.c
> branches/ebcdic/trunk/subversion/tests/libsvn_repos/repos-test.c
> branches/ebcdic/trunk/subversion/tests/svn_test_main.c
>
> Log:
> A few minor fixes to port test programs to IBM iSeries.
>
> * subversion/libsvn_subr/opt.c
> (BASE_STR, HEAD_STR): New utf-8 hex-escaped symbolic constants.
> (svn_opt_parse_path): Use new symbols in place of string literals.
>
> * subversion/tests/libsvn_repos/repos-test.c
> (authz_get_handle): apr_file_remove needs ebcdic encoded path name.
> (authz, commit_editor_authz, commit_continue_txn): New pragma
> convert blocks to make msg ebcdic.
>
> * subversion/tests/svn_test_main.c
> (main): Make --fs-type value utf-8.
>
> --- branches/ebcdic/trunk/subversion/tests/libsvn_repos/repos-test.c (original)
> +++ branches/ebcdic/trunk/subversion/tests/libsvn_repos/repos-test.c Wed Nov 30 10:15:58 2005
> @@ -1099,7 +1099,7 @@
> {
> apr_file_t *authz_file;
> apr_status_t apr_err;
> - const char *authz_file_path;
> + const char *authz_file_path, *authz_file_path_native;
> svn_error_t *err;
>
> /* Create a temporary file, and fetch its name. */
> @@ -1107,19 +1107,26 @@
> "authz_file", "tmp", FALSE, pool),
> "Opening temporary file");
>
> +#if !APR_CHARSET_EBCDIC
> + authz_file_path_native = authz_file_path;
> +#else
> + SVN_ERR (svn_utf_cstring_from_utf8(&authz_file_path_native,
> + authz_file_path, pool));
> +#endif
> +

That looks like something that should be on the trunk.

> /* Write the authz ACLs to the file. */
> if ((apr_err = apr_file_write_full (authz_file, authz_contents,
> strlen (authz_contents), NULL)))
> {
> (void) apr_file_close (authz_file);
> - (void) apr_file_remove (authz_file_path, pool);
> + (void) apr_file_remove (authz_file_path_native, pool);
> return svn_error_wrap_apr (apr_err, "Writing test authz file");
> }
>
> /* Close the temporary descriptor. */
> if ((apr_err = apr_file_close (authz_file)))
> {
> - (void) apr_file_remove (authz_file_path, pool);
> + (void) apr_file_remove (authz_file_path_native, pool);
> return svn_error_wrap_apr (apr_err, "Closing test authz file");
> }
>
> @@ -1131,7 +1138,7 @@
> }
>
> /* Delete the file, but ignore the error if we've a more important one. */
> - if ((apr_err = apr_file_remove (authz_file_path, pool)))
> + if ((apr_err = apr_file_remove (authz_file_path_native, pool)))
> return svn_error_wrap_apr (apr_err, "Removing test authz file");
>

> --- branches/ebcdic/trunk/subversion/tests/svn_test_main.c (original)
> +++ branches/ebcdic/trunk/subversion/tests/svn_test_main.c Wed Nov 30 10:15:58 2005
> @@ -252,7 +252,12 @@
> else if (strcmp(*arg, "--verbose") == 0)
> verbose_mode = 1;
> else if (strncmp(*arg, "--fs-type=", 10) == 0)
> +#if !AS400
> opts.fs_type = apr_pstrdup (pool, (*arg) + 10);
> +#else
> + /* Only fs type support on the iSeries */
> + opts.fs_type = DEFAULT_FS_TYPE;
> +#endif
> }
>

Hmm, I wonder if trunk should be doing a native to UTF8 conversion?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 9 02:34:13 2005

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