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

Re: svn commit: rev 1894 - trunk/subversion/libsvn_repos

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-05-07 20:30:48 CEST

On Tue, May 07, 2002 at 10:57:51AM -0500, sussman@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_repos/dump.c Tue May 7 10:57:37 2002
>...
> @@ -153,7 +153,7 @@
> struct edit_baton *eb = edit_baton;
> struct dir_baton *pb = parent_dir_baton;
> struct dir_baton *new_db = apr_pcalloc (pool, sizeof (*new_db));
> - svn_stringbuf_t *full_path = svn_stringbuf_dup (eb->path, pool);
> + const char *full_path = apr_pstrdup (pool, eb->path);
>
> /* A path relative to nothing? I don't think so. */
> if (path && (! pb))
> @@ -161,7 +161,7 @@
>
> /* Construct the full path of this node. */
> if (pb)
> - svn_path_add_component_nts (full_path, path);
> + svn_path_join (full_path, path, pool);

Might be handy to assign the result to something :-)

I'd suggest something like:

    if (pb)
        full_path = svn_path_join (eb->path, path, pool);
    else
        full_path = apr_pstrdup (pool, eb->path);

(to avoid dup'ing full_path, then again when it gets joined)

>...
> if (kind == svn_node_file)
> - svn_stream_printf (stream, pool,
> - SVN_REPOS_DUMPFILE_NODE_KIND ": file\n");
> + SVN_ERR (svn_stream_printf (stream, pool,
> + SVN_REPOS_DUMPFILE_NODE_KIND ": file\n"));

Hunh. Looking at these, they're also non-formatted string constants. Maybe a
bit too annoying to switch to write(), though.

[ hmm... maybe svn_stream_putstr() ? ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 7 20:29:37 2002

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