Hi all, I see a potential problem in the use of svn_wc__node_get_kind(): incomplete state due to an interrupted operation.
Let's see the return values for svn_wc__node_get_kind(). It is quite indistinguishable whether a node is not versioned, or whether it is versioned but in incomplete state: BASE or | one or | the | node is | show_ | Returned value WORKING | both are | kind | hidden | hidden | node | incomplete | is set | | arg is | exists | | | | TRUE | ------------------------------------------------------------------- 1| no - - - * | svn_node_unknown 2| yes incomplete no - * | svn_node_unknown 3| yes complete yes hidden no | svn_node_none 4| yes complete yes hidden yes | _dir/_file 5| yes complete yes not hidden * | _dir/_file 6| yes incomplete yes - * | _dir/_file (relevant?) 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? What do the wc-ng gurus think about this? Thanks, ~Neels
signature.asc
Description: OpenPGP digital signature