[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 2578 - trunk/subversion/libsvn_wc trunk/subversion/libsvn_ra_local trunk/subversion/libsvn_client trunk/subversion/libsvn_ra_dav

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-07-18 20:16:24 CEST

On Thu, Jul 18, 2002 at 12:00:52PM -0500, cmpilato@tigris.org wrote:
>...
> - const char *full_path;
> -
> - if (eb->target)
> - full_path = svn_path_join (eb->anchor, eb->target, eb->pool);
> - else
> - full_path = apr_pstrdup (eb->pool, eb->anchor);
> -
> /* Make sure our update target now has the new working revision.
> Also, if this was an 'svn switch', then rewrite the target's
> url. All of this tweaking might happen recursively! */
> SVN_ERR (svn_wc__do_update_cleanup
> - (full_path,
> + (svn_path_join_many (eb->pool, eb->anchor, eb->target, NULL),

Heh. Sneaky bastard. :-)

Please add a comment about your use of svn_path_join_many(). Readers of the
code will definitely hit a speed bump here until they realize that
everything is "okay" if eb->target == NULL.

>...
> + expected_url = svn_path_join (p_entry->url,
> + svn_path_uri_encode (base_name, pool),
> + pool);

This pattern occurs all over the place. How about a utility function?

Name... hmm... svn_url_add_segment() works for me. The doc would state that
the new segment gets encoded, then joined to the base URL passed. If
somebody has encoded parts already, then they can just use svn_path_join().

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 Thu Jul 18 20:14:30 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.