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

Re: svn commit: r31320 - trunk/subversion/svn

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Wed, 21 May 2008 16:50:09 -0400

"David Glasser" <glasser_at_davidglasser.net> writes:
> This commit has two issues.
>
> The first is that it prints warnings for each bad argument, and then
> prints a confusing redundant error at the end for last one only.

That was deliberate, but...

> Perhaps this should be fixed by adding a new error code
> ('svn'-specific?) which means "just clear the error without printing
> it, but exit false"?

...I think you're right that it could be better. I can take care of
this, although I'd like to plow through some STATUS reviews first
(taking longer than I expected, but higher priority).

> The second is that there's an error leak (ie, maint-mode segv)
> somewhere. Namely:
>
>> if (opt_state->xml && (! opt_state->incremental))
>> SVN_ERR(svn_cl__xml_print_footer("info", pool));
>>
>> - return SVN_NO_ERROR;
>> + if (err)
>
> Right here, you need to clear prev_err.
>
>> + return err;
>> + else
>> + return prev_err;
>> }
>
> However, you can simplify all the prev_err code away if you think my
> suggestion for the first problem is reasonable, since then you just
> have to maintain a printed_some_warning boolean.

Hunh. I thought it okay to leave one error dangling at the end of a
loop that creates possibly N errors (that is, this was a conscious
decision). But it's certainly sub-optimal. I'll rewrite so all of the
above problems go away, unless someone beats me to it.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-21 22:50:24 CEST

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.