[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 1985 - trunk/subversion/libsvn_client trunk/subversion/mod_dav_svn trunk/subversion/libsvn_ra_dav

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-05-21 03:10:50 CEST

Oop. One more comment:

On Mon, May 20, 2002 at 06:47:30PM -0500, sussman@tigris.org wrote:
>...
> +++ trunk/subversion/mod_dav_svn/update.c Mon May 20 18:47:29 2002
>...
> @@ -167,6 +172,12 @@
> else
> baton->path2 = apr_pstrcat(pool, parent->path2, "/", name, NULL);
>
> + /* Telescope the third path: it's relative, not absolute, to dst_path. */
> + if (parent->path3[0] == '\0')
> + baton->path3 = apr_pstrdup(pool, name);
> + else
> + baton->path3 = apr_pstrcat(pool, parent->path3, "/", name, NULL);

This is greatly simplified as:

    baton->path3 = svn_path_join(parent->path3, name, pool);

The empty path for root ("") is handled automatically by svn_path_join().

It looks like svn_path_join() could also be used by path and path2 in the
preceding code, removing their 'if' tests.

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 21 03:08:46 2002

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.