subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1757760 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Thu, 25 Aug 2016 21:58:53 GMT
Author: ivan
Date: Thu Aug 25 21:58:53 2016
New Revision: 1757760

URL: http://svn.apache.org/viewvc?rev=1757760&view=rev
Log:
* subversion/libsvn_client/conflicts.c
  (verify_local_state_for_incoming_add_upon_update): Check for
   ERR && ERR->APR_ERR in single if statement.

Modified:
    subversion/trunk/subversion/libsvn_client/conflicts.c

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1757760&r1=1757759&r2=1757760&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Thu Aug 25 21:58:53 2016
@@ -4846,32 +4846,29 @@ verify_local_state_for_incoming_add_upon
   err = svn_wc__node_get_base(&base_kind, &base_rev, &base_repos_relpath,
                               NULL, NULL, NULL, ctx->wc_ctx, local_abspath,
                               FALSE, scratch_pool, scratch_pool);
-  if (err)
+  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
     {
-      if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-        {
-          if (option_id == svn_client_conflict_option_incoming_add_ignore)
-            return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
-                                     _("Cannot resolve tree conflict on '%s' "
-                                       "by ignoring the incoming addition "
-                                       "(expected a base node but found none)"),
-                                     local_style_relpath);
-          else if (option_id ==
-                   svn_client_conflict_option_incoming_added_file_replace ||
-                   option_id ==
-                   svn_client_conflict_option_incoming_added_dir_replace)
-            return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
-                                     _("Cannot resolve tree conflict on '%s' "
-                                       "by replacing the locally added node "
-                                       "(expected a base node but found none)"),
-                                     local_style_relpath);
-          else
-            return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
-                                     _("Unexpected option id '%d'"), option_id);
-        }
+      if (option_id == svn_client_conflict_option_incoming_add_ignore)
+        return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
+                                 _("Cannot resolve tree conflict on '%s' "
+                                   "by ignoring the incoming addition "
+                                   "(expected a base node but found none)"),
+                                 local_style_relpath);
+      else if (option_id ==
+               svn_client_conflict_option_incoming_added_file_replace ||
+               option_id ==
+               svn_client_conflict_option_incoming_added_dir_replace)
+        return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
+                                 _("Cannot resolve tree conflict on '%s' "
+                                   "by replacing the locally added node "
+                                   "(expected a base node but found none)"),
+                                 local_style_relpath);
       else
-        return svn_error_trace(err);
+        return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err,
+                                 _("Unexpected option id '%d'"), option_id);
     }
+  else if (err)
+    return svn_error_trace(err);
 
   if (base_kind != incoming_new_kind)
     {



Mime
View raw message