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

Re: [PATCH] Issue #1935: svn status too verbose with svn:externals definitions

From: <kfogel_at_collab.net>
Date: 2005-08-25 17:29:02 CEST

Scott Palmer <scott.palmer@2connected.org> writes:
> What is the apr function to convert to UTF8? I don't suppose there
> an easy way to fold the conversion into the strndup without
> converting the entire path, not just the prefix that I need to print?
> I'm just thinking of avoiding more of those allocations, but I guess
> if we clear the pool when the message is printed it doesn't matter.
> I just didn't have time to understand enough of how the pool was used
> to feel comfortable with that. How do we know when it is "safe" to
> clear the pool? It seems any user of the pool has to be very careful
> that it isn't cleared before they are done with it.

See the interfaces in svn_utf.h, those are what you should use.

The difference between converting an entire path and a prefix of that
path is not worth worrying about, IMHO.

The way to know if it's safe to clear a pool is to look at what
objects are allocated in that pool, and know what their lifetimes
should be. Fortunately, in this case, that was very easy to do by
inspecting the code (at least, it was easy from looking at the
original, pre-change code -- you might want to double check that a
pool clear will still be okay after the change too).

> Now I'm concerned about the skipped utf8 test... Perhaps it would
> have caught my UTF8 strlen mistake?
> I'm running on OS X, I think there were some known issues with that
> test on OS X at one point.

I don't know what's up with that test. It's been skipping forever on
all the systems I run 'make check' on, but I haven't looked into it.

I doubt it would have caught that mistake anyway, as it probably
doesn't do anything with externals. (Feel free to write your a new
regression test, though! In your copious spare time, of course... :-) ).

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 25 18:29:03 2005

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.