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

Re: [PATCH] Fix Issue #1997

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-04-17 19:09:43 CEST

On Mon, 17 Apr 2006, Paul Burba wrote:

> A V5R4 user on the OS400 list reported a problem with svnadmin verify
> yesterday. Turns out to be a manifestation of issue #1997. The fix seems
> so painfully straightforward that I fear I might be missing something(?)
...
> [[[
> Fix reopened issue #1997: 'svnadmin verify' should write to stderr in
> console encoding, instead of assuming UTF-8.
>
> Follow-up to r12687, r15391.
>
> * subversion/svnadmin/main.c
> (subcommand_verify): Set up stderr_stream to pass incoming data to
> recode_write, which uses svn_cmdline_fprintf for console output.
> ]]]
...
> Index: subversion/svnadmin/main.c
> ===================================================================
> --- subversion/svnadmin/main.c (revision 19395)
> +++ subversion/svnadmin/main.c (working copy)
> @@ -974,13 +974,19 @@
> struct svnadmin_opt_state *opt_state = baton;
> svn_repos_t *repos;
> svn_stream_t *stderr_stream = NULL;
> + struct recode_write_baton stderr_stream_rwb = { 0 };
> svn_revnum_t youngest;
>
> /* This whole process is basically just a dump of the repository
> with no interest in the output. */
> SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
> SVN_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs(repos), pool));
> - SVN_ERR(create_stdio_stream(&stderr_stream, apr_file_open_stderr, pool));
> +
> + stderr_stream = svn_stream_create (&stderr_stream_rwb, pool);
> + stderr_stream_rwb.pool = svn_pool_create(pool);
> + stderr_stream_rwb.out = stderr;
> + svn_stream_set_write (stderr_stream, recode_write);
> +
> SVN_ERR(svn_repos_dump_fs2(repos, NULL, stderr_stream,
> 0, youngest, FALSE, FALSE, check_cancel, NULL,
> pool));

We've got this code in a few places in svnadmin now. Any particular
reason why, and why no macro or helper function?

-- 
Daniel Rall

  • application/pgp-signature attachment: stored
Received on Mon Apr 17 21:54:32 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.