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

Re: wc-ng: determine if a node is versioned

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 24 Apr 2010 11:30:27 -0400

On Sat, Apr 24, 2010 at 10:37, Neels J Hofmeyr <neels_at_elego.de> wrote:
>...
> At first glance, it appears that different code paths want to handle
> incomplete nodes differently. Some want to act as if the node was 'normal'
> == versioned. Most appear to want to act as if incomplete nodes were
> non-versioned -- but maybe they just do that now because a cleanly
> non-versioned node returns the same value as an incomplete node. And that's
> the problem -- the API tempts hackers to just ignore the incomplete state
> without reflection.
>
> Maybe svn_wc__node_get_kind() should use determine if a node is incomplete
> and throw an error if so, including a boolean arg allow_incomplete to bypass
> that error?

The node_get_kind API is there for simplicity. Don't throw errors.

Adjust return values instead. I would recommend returning none for
unversioned and hidden nodes (the idea behind hidden is "it isn't
there", so these are the same concept). And reserve unknown for
incomplete nodes.

Cheers,
-g
Received on 2010-04-24 17:30:56 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.