The attached patch factors out some code, but it reveals an inconsistency.
In svn_wc__delete_many(), an unversioned target is handled as:
    if (delete_unversioned_target && !keep_local):

      Delete it.
    Continue successfully.

In svn_wc__delete_internal() -- the single-file variant -- an unversioned 
target is handled as:
    if (delete_unversioned_target):
      Delete it if !keep_local.      Return successfully.
    else:
      Return the 'unversioned' error.

The difference is, if a target is unversioned and delete_unversioned_target is 
FALSE, __delete_many will continue whereas __delete_internal will throw an 
error.

Documentation is found on svn_wc_delete4():

 * If @a delete_unversioned_target is TRUE and @a local_abspath is not
 * versioned, @a local_abspath will be handled as an added files without
 * history. So it will be deleted if @a keep_local is FALSE. If @a
 * delete_unversioned is FALSE and @a local_abspath is not versioned a
 * #SVN_ERR_WC_PATH_NOT_FOUND error will be returned.


(The two private API's don't document anything about this.)

According to that doc string, __delete_many is wrong.

This version of the patch selects the __delete_internal variant ("throw an 
error"), and many tests fail.  That suggests thatin some cases we are expecting 
the opposite behaviour.


So what do we want to do?


- Julian


--
Certified & Supported Apache Subversion Downloads: 
http://www.wandisco.com/subversion/download

Attachment: wc-delete-factored-out-1.patch
Description: Binary data

Reply via email to