subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1337706 - in /subversion/trunk/subversion/libsvn_wc: conflicts.c wc_db.c
Date Sat, 12 May 2012 22:20:36 GMT
Author: rhuijben
Date: Sat May 12 22:20:35 2012
New Revision: 1337706

URL: http://svn.apache.org/viewvc?rev=1337706&view=rev
Log:
Following up on r1337692, also use svn_wc__db_op_mark_resolved() for resolving
tree conflicts.

* subversion/libsvn_wc/conflicts.c
  (resolve_conflict_on_node): Add tree conflict option and cancel callback.
    Move output arguments to the start of the argument list.
    Pass cancel callback to working queue.
  (svn_wc__resolve_text_conflict): Update caller.
  (resolve_one_conflict): Use resolve_conflict_on_node for all conflict types.
  (recursive_resolve_conflict): Update caller.

* subversion/libsvn_wc/wc_db.c
  (recursive_resolve_conflict): Remove now unneeded assertion.

Modified:
    subversion/trunk/subversion/libsvn_wc/conflicts.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1337706&r1=1337705&r2=1337706&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Sat May 12 22:20:35 2012
@@ -131,12 +131,15 @@ svn_wc__conflict_skel_add_prop_conflict(
    See svn_wc_resolved_conflict5() for how CONFLICT_CHOICE behaves.
 */
 static svn_error_t *
-resolve_conflict_on_node(svn_wc__db_t *db,
+resolve_conflict_on_node(svn_boolean_t *did_resolve,
+                         svn_wc__db_t *db,
                          const char *local_abspath,
                          svn_boolean_t resolve_text,
                          svn_boolean_t resolve_props,
+                         svn_boolean_t resolve_tree,
                          svn_wc_conflict_choice_t conflict_choice,
-                         svn_boolean_t *did_resolve,
+                         svn_cancel_func_t cancel_func_t,
+                         void *cancel_baton,
                          apr_pool_t *pool)
 {
   const char *conflict_old = NULL;
@@ -293,13 +296,13 @@ resolve_conflict_on_node(svn_wc__db_t *d
         resolve_props = FALSE;
     }
 
-  if (resolve_text || resolve_props)
+  if (resolve_text || resolve_props || resolve_tree)
     {
       SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath,
                                           resolve_text, resolve_props,
-                                          FALSE, work_items, pool));
+                                          resolve_tree, work_items, pool));
       SVN_ERR(svn_wc__wq_run(db, local_abspath,
-                             NULL, NULL, /* cancellation */
+                             cancel_func_t, cancel_baton,
                              pool));
       *did_resolve = TRUE;
     }
@@ -316,11 +319,13 @@ svn_wc__resolve_text_conflict(svn_wc__db
   svn_boolean_t ignored_result;
 
   return svn_error_trace(resolve_conflict_on_node(
+                           &ignored_result,
                            db, local_abspath,
                            TRUE /* resolve_text */,
                            FALSE /* resolve_props */,
+                           FALSE /* resolve_tree */,
                            svn_wc_conflict_choose_merged,
-                           &ignored_result,
+                           NULL, NULL, /* cancel_func */
                            scratch_pool));
 }
 
@@ -335,6 +340,8 @@ resolve_one_conflict(svn_wc__db_t *db,
                      svn_wc_conflict_choice_t conflict_choice,
                      svn_wc_conflict_resolver_func2_t conflict_func,
                      void *conflict_baton,
+                     svn_cancel_func_t cancel_func,
+                     void *cancel_baton,
                      svn_wc_notify_func2_t notify_func,
                      void *notify_baton,
                      apr_pool_t *scratch_pool)
@@ -397,8 +404,15 @@ resolve_one_conflict(svn_wc__db_t *db,
                                                                 iterpool));
               }
 
-            SVN_ERR(svn_wc__db_op_set_tree_conflict(db, local_abspath, NULL,
-                                                    iterpool));
+            SVN_ERR(resolve_conflict_on_node(&did_resolve,
+                                             db,
+                                             local_abspath,
+                                             FALSE /* resolve_text */,
+                                             FALSE /* resolve_props */,
+                                             TRUE /* resolve_tree */,
+                                             my_choice,
+                                             cancel_func, cancel_baton,
+                                             iterpool));
 
             resolved = TRUE;
             break;
@@ -407,12 +421,14 @@ resolve_one_conflict(svn_wc__db_t *db,
             if (!resolve_text)
               break;
 
-            SVN_ERR(resolve_conflict_on_node(db,
+            SVN_ERR(resolve_conflict_on_node(&did_resolve,
+                                             db,
                                              local_abspath,
                                              TRUE /* resolve_text */,
                                              FALSE /* resolve_props */,
+                                             FALSE /* resolve_tree */,
                                              my_choice,
-                                             &did_resolve,
+                                             cancel_func, cancel_baton,
                                              iterpool));
 
             if (did_resolve)
@@ -433,12 +449,14 @@ resolve_one_conflict(svn_wc__db_t *db,
 
 
             /* We don't have property name handling here yet :( */
-            SVN_ERR(resolve_conflict_on_node(db,
+            SVN_ERR(resolve_conflict_on_node(&did_resolve,
+                                             db,
                                              local_abspath,
                                              FALSE /* resolve_text */,
                                              TRUE /* resolve_props */,
+                                             FALSE /* resolve_tree */,
                                              my_choice,
-                                             &did_resolve,
+                                             cancel_func, cancel_baton,
                                              iterpool));
 
             if (did_resolve)
@@ -499,6 +517,7 @@ recursive_resolve_conflict(svn_wc__db_t 
                                    resolve_tree,
                                    conflict_choice,
                                    conflict_func, conflict_baton,
+                                   cancel_func, cancel_baton,
                                    notify_func, notify_baton,
                                    iterpool));
     }
@@ -563,6 +582,7 @@ recursive_resolve_conflict(svn_wc__db_t 
                                      resolve_tree,
                                      conflict_choice,
                                      conflict_func, conflict_baton,
+                                     cancel_func, cancel_baton,
                                      notify_func, notify_baton,
                                      iterpool));
     }
@@ -594,6 +614,7 @@ recursive_resolve_conflict(svn_wc__db_t 
                                    resolve_tree,
                                    conflict_choice,
                                    conflict_func, conflict_baton,
+                                   cancel_func, cancel_baton,
                                    notify_func, notify_baton,
                                    iterpool));
     }

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1337706&r1=1337705&r2=1337706&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sat May 12 22:20:35 2012
@@ -5252,9 +5252,6 @@ svn_wc__db_op_mark_resolved(svn_wc__db_t
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  /* ### we're not ready to handy RESOLVED_TREE just yet.  */
-  SVN_ERR_ASSERT(!resolved_tree);
-
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
                               local_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);



Mime
View raw message