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

Re: svn commit: r40186 - branches/1.6.x-future-proof/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 22 Oct 2009 21:56:43 -0400

On Thu, Oct 22, 2009 at 18:21, Hyrum K. Wright
<hyrum_wright_at_mail.utexas.edu> wrote:
> I went to the trouble to read the format number so that it would fit within
> our existing "oops, I've got a format number higher than I know what to do
> with" paradigm.  I realize we could just set it to 99 or something equally
> as bogus, but that felt too hacky and grabbing the format number is a single
> function call.
>
> But frankly, whatever performance difference that exists shouldn't matter
> very much anyway, since this is an error condition, and that condition isn't
> likely to be hit.  (What I *would* like, though, would be a way to say
> "you're part of the wc-ng working copy rooted at /bar/gruff/foo".  Oh well.)

You can do that, no problem. Have is_inside_wc_ng() raise that
specific error, rather than returning a version number. It knows the
root of the wc-ng tree.

And since it is raising an error, it doesn't even have to get into the
format number game. It has two options: raise an error, or return 0
for "not a wc". Simpler, *and* you get what you want.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2410494
Received on 2009-10-23 03:56:53 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.