On Sat, Apr 24, 2010 at 10:37, Neels J Hofmeyr <[email protected]> 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

