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

Re: [PATCH] svn_wc_add3(): handles depth on add (was Re: [PATCH] Fix --depth behavior for svn add)

From: Rui, Guo <timmyguo_at_mail.ustc.edu.cn>
Date: Mon, 5 May 2008 20:48:43 +0800

On Mon, May 05, 2008 at 11:55:55AM +0200, Stefan Sperling wrote:
> >
> > + /* default to depth_infinity if the value is invalid */
> > + if (!(depth >= svn_depth_empty
> > + && depth <= svn_depth_infinity))
> > + depth = svn_depth_infinity;
> > +
> > /* Get the original entry for this path if one exists (perhaps
> > this is actually a replacement of a previously deleted thing).
>
> Shouldn't this throw an error instead of silently overriding whatever
> the caller passed in? Silently overriding the caller's value may produce
> subtle bugs in client software that are difficult to track down for our
> API consumers. I think it's better to let people know right away when they
> did something wrong, by throwing an error at them. You could create
> a new error code if no suitable one already eixsts, for example
> SVN_ERR_WC_INVALID_DEPTH, or something like that.

Well, I'll fix this. However, does this error fit in the wc category? After
all, it's not the wc itself but the parameter that has problem.

Rui, Guo

---------------------------------------------------------------------
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-05 14:49:29 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.