Author: rhuijben Date: Tue Jul 16 11:25:32 2013 New Revision: 1503662 URL: http://svn.apache.org/r1503662 Log: Provide the missing commit paths to API users by adding a notify right before returning a commit error, just like how we handle out-of-date and other commit problems.
* subversion/include/svn_wc.h (svn_wc_notify_action_t): Add notification value. * subversion/libsvn_client/commit.c (svn_client_commit6): Notify missing path. Modified: subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_client/commit.c Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1503662&r1=1503661&r2=1503662&view=diff ============================================================================== --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Tue Jul 16 11:25:32 2013 @@ -1261,6 +1261,11 @@ typedef enum svn_wc_notify_action_t * @since New in 1.9. */ svn_wc_notify_cleanup_external, + /** The operation failed because the operation (E.g. commit) is only valid + * if the operation includes this path. + * @since New in 1.9. */ + svn_wc_notify_failed_requires_target + } svn_wc_notify_action_t; Modified: subversion/trunk/subversion/libsvn_client/commit.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1503662&r1=1503661&r2=1503662&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/commit.c (original) +++ subversion/trunk/subversion/libsvn_client/commit.c Tue Jul 16 11:25:32 2013 @@ -854,6 +854,19 @@ svn_client_commit6(const apr_array_heade svn_dirent_local_style(item->path, iterpool), svn_dirent_local_style(delete_op_root_abspath, iterpool)); + + if (ctx->notify_func2) + { + svn_wc_notify_t *notify; + notify = svn_wc_create_notify( + delete_op_root_abspath, + svn_wc_notify_failed_requires_target, + iterpool); + notify->err = cmt_err; + + ctx->notify_func2(ctx->notify_baton2, notify, iterpool); + } + goto cleanup; } } @@ -885,6 +898,19 @@ svn_client_commit6(const apr_array_heade svn_dirent_local_style(item->path, iterpool), svn_dirent_local_style(copy_op_root_abspath, iterpool)); + + if (ctx->notify_func2) + { + svn_wc_notify_t *notify; + notify = svn_wc_create_notify( + copy_op_root_abspath, + svn_wc_notify_failed_requires_target, + iterpool); + notify->err = cmt_err; + + ctx->notify_func2(ctx->notify_baton2, notify, iterpool); + } + goto cleanup; } }