In a follow-up mail I wrote:
> My previous mail in this thread was bogus, please ignore it :-).
Sigh.  That was wrong.  I was *not* misunderstanding the code, and my
original mail in this thread -- quoted below -- made sense after all.
Please ignore the retraction.  (In the future, I shan't trust
revelations that come while babysitting.)
Sorry to spin around twice like that, Philip.  It's a confusing bit of
code, but not *that* confusing.  I just had gnats in the head.
-Karl
kfogel@collab.net writes:
> Background:
> ===========
> 
> In r7605, we started doing something very subtle with how we print out
> the error messages in a given error chain.
> 
> As we walk down an error chain, we always print the error message if
> it has a custom message.  If it doesn't have a custom message, we must
> fall back to svn_strerror or apr_strerror, in which case we print the
> appropriate strerror message for that code *only* if this error's code
> differs from the error code previous to it in the chain.
> 
> The result is that, in a contiguous subchain of errors that all share
> the same code, any errors that don't have a custom message, and are
> not first in the subchain, will not be printed out at all.  Note that
> this means an error that falls back to the default message will be
> suppressed if it was preceded by an error with a custom message --
> that is, the default message never gets printed out at all, no matter
> how many of the errors in the chain use it.
> 
> As an aside, I believe the comment
> 
>     /* Only print the same APR error string once. */
> 
> in libsvn_subr/error.c:print_error() is either misplaced or just
> wrong.  If it belongs anywhere, it belongs in svn_handle_error(),
> right above the call to print_error().  I'm mentioning this here first
> as a sanity check, before I move it.
> 
> The Problem:
> ============
> 
> See Philip Martin's "Dec 2 15:09:53" comment at the end of
> 
>    http://subversion.tigris.org/issues/show_bug.cgi?id=1822
> 
> Basically, the current logic is causing users to get an error like
> 
>    Error bumping revisions post-commit (details follow):
> 
> or
> 
>    Error unlocking locked dirs (details follow):
> 
> ...but then no details follow!  People are understandably annoyed at
> this behavior :-).
> 
> A Solution:
> ===========
> 
> I believe the best solution is to change the logic to something
> equally subtle, but different:
> 
> In a given error chain, we should still print out every error that has
> a custom message.  But for those that have only an error code, we
> should make sure that the strerror(code) message gets printed out
> exactly once -- once, because that adds information that hasn't
> already been printed, but not more than once, because there's no point
> saying the same thing twice.
> 
> Before I implement this, does anyone have any comments?
> 
> -Karl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec  4 19:02:37 2004