You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/02/16 17:06:09 UTC

svn commit: r1730708 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/resolved.c

Author: stsp
Date: Tue Feb 16 16:06:09 2016
New Revision: 1730708

URL: http://svn.apache.org/viewvc?rev=1730708&view=rev
Log:
Return SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE where applicable, instead
of returning the very generic SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE error code.

* subversion/include/svn_client.h
  (svn_client_conflict_tree_resolve_by_id,
   svn_client_conflict_prop_resolve_by_id,
   svn_client_conflict_text_resolve_by_id): Document error case.

* subversion/libsvn_client/resolved.c
  (svn_client_conflict_tree_resolve_by_id,
   svn_client_conflict_prop_resolve_by_id,
   svn_client_conflict_text_resolve_by_id): Return better error code.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/resolved.c

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1730708&r1=1730707&r2=1730708&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Tue Feb 16 16:06:09 2016
@@ -4725,9 +4725,12 @@ svn_client_conflict_tree_resolve(svn_cli
                                  apr_pool_t *scratch_pool);
 
 /**
+ * Like svn_client_conflict_tree_resolve(), except that it identifies
+ * the desired resolution option by ID @a option_id.
+ *
  * If the provided @a option_id is the ID of an option which resolves
- * @a conflict, resolve the tree conflict using that option.
- * Else, return an error.
+ * @a conflict, try to resolve the tree conflict using that option.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
  *
  * @since New in 1.10.
  */
@@ -4804,7 +4807,8 @@ svn_client_conflict_prop_resolve(svn_cli
 /**
  * If the provided @a option_id is the ID of an option which resolves
  * @a conflict, resolve the property conflict in property @a propname
- * using that option. Else, return an error.
+ * using that option.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
  *
  * @since New in 1.10.
  */
@@ -4868,7 +4872,7 @@ svn_client_conflict_text_resolve(svn_cli
 /**
  * If the provided @a option_id is the ID of an option which resolves
  * @a conflict, resolve the text conflict using that option.
- * Else, return an error.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
  *
  * @since New in 1.10.
  */

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1730708&r1=1730707&r2=1730708&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Tue Feb 16 16:06:09 2016
@@ -1245,12 +1245,13 @@ svn_client_conflict_text_resolve_by_id(
   option = svn_client_conflict_option_find_by_id(resolution_options,
                                                  option_id);
   if (option == NULL)
-    return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
-                               _("Inapplicable conflict resolution option "
-                                 "ID '%d' given for conflicted path '%s'"),
-                               option_id,
-                               svn_dirent_local_style(conflict->local_abspath,
-                                                      scratch_pool));
+    return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE,
+                             NULL,
+                             _("Inapplicable conflict resolution option "
+                               "ID '%d' given for conflicted path '%s'"),
+                             option_id,
+                             svn_dirent_local_style(conflict->local_abspath,
+                                                    scratch_pool));
   SVN_ERR(svn_client_conflict_text_resolve(conflict, option, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -1291,12 +1292,13 @@ svn_client_conflict_prop_resolve_by_id(
   option = svn_client_conflict_option_find_by_id(resolution_options,
                                                  option_id);
   if (option == NULL)
-    return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
-                               _("Inapplicable conflict resolution option "
-                                 "ID '%d' given for conflicted path '%s'"),
-                               option_id,
-                               svn_dirent_local_style(conflict->local_abspath,
-                                                      scratch_pool));
+    return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE,
+                             NULL,
+                             _("Inapplicable conflict resolution option "
+                               "ID '%d' given for conflicted path '%s'"),
+                             option_id,
+                             svn_dirent_local_style(conflict->local_abspath,
+                                                    scratch_pool));
   SVN_ERR(svn_client_conflict_prop_resolve(conflict, propname, option,
                                            scratch_pool));
 
@@ -1382,12 +1384,13 @@ svn_client_conflict_tree_resolve_by_id(
   option = svn_client_conflict_option_find_by_id(resolution_options,
                                                  option_id);
   if (option == NULL)
-    return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
-                               _("Inapplicable conflict resolution option "
-                                 "ID '%d' given for conflicted path '%s'"),
-                               option_id,
-                               svn_dirent_local_style(conflict->local_abspath,
-                                                      scratch_pool));
+    return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE,
+                             NULL,
+                             _("Inapplicable conflict resolution option "
+                               "ID '%d' given for conflicted path '%s'"),
+                             option_id,
+                             svn_dirent_local_style(conflict->local_abspath,
+                                                    scratch_pool));
   SVN_ERR(svn_client_conflict_tree_resolve(conflict, option, scratch_pool));
 
   return SVN_NO_ERROR;