subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1713718 - in /subversion/branches/move-tracking-2/subversion/svnmover: merge3.c svnmover.c
Date Tue, 10 Nov 2015 19:33:48 GMT
Author: julianfoad
Date: Tue Nov 10 19:33:48 2015
New Revision: 1713718

URL: http://svn.apache.org/viewvc?rev=1713718&view=rev
Log:
On the 'move-tracking-2' branch: Make 'svnmover revert' also discard all
conflicts, like 'svn revert' does.

Also fix some memory allocation bugs.

* subversion/svnmover/merge3.c
  (branch_merge_subtree_r): Allocate conflicts in the result pool.

* subversion/svnmover/svnmover.c
  (do_switch): Don't raise an error just because there are conflicts.
  (do_revert): Discard all conflicts.
  (execute): After 'merge', don't raise an error just because there are
    conflicts. Remember conflicts in the WC pool so they will persist beyond
    this iteration of the command loop.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/merge3.c
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/svnmover/merge3.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/merge3.c?rev=1713718&r1=1713717&r2=1713718&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/merge3.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/merge3.c Tue Nov 10 19:33:48 2015
@@ -965,7 +965,7 @@ branch_merge_subtree_r(svn_branch_txn_t
 {
   svn_branch_subtree_t *s_src, *s_tgt, *s_yca;
   apr_hash_t *diff_yca_src, *diff_yca_tgt;
-  apr_hash_t *e_conflicts = apr_hash_make(scratch_pool);
+  apr_hash_t *e_conflicts = apr_hash_make(result_pool);
   conflict_storage_t *conflict_storage = conflict_storage_create(result_pool);
   SVN_ITER_T(svn_element_content_t *) *pi;
   svn_element_tree_t *src_elements, *tgt_elements, *yca_elements;

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1713718&r1=1713717&r2=1713718&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Tue Nov 10 19:33:48
2015
@@ -1360,18 +1360,12 @@ do_switch(svnmover_wc_t *wc,
       if (svnmover_any_conflicts(wc->conflicts))
         {
           SVN_ERR(svnmover_display_conflicts(wc->conflicts, scratch_pool));
-          return svn_error_createf(
-                   SVN_ERR_BRANCHING, NULL,
-                   _("Switch failed because of conflicts"));
-        }
-      else
-        {
-          SVN_DBG(("Switch completed: no conflicts"));
         }
 
-      /* ### TODO: If the merge raises conflicts, either revert to the
-             pre-update state or store and handle the conflicts. Currently
-             this just leaves the merge partially done and raises an error. */
+      /* ### TODO: If the merge raises conflicts, allow the user to revert
+             to the pre-update state or resolve the conflicts. Currently
+             this leaves the merge partially done and the pre-update state
+             is lost. */
     }
 
   return SVN_NO_ERROR;
@@ -2468,6 +2462,7 @@ do_revert(svnmover_wc_t *wc,
                  wc->working->branch,
                  wc->base->branch,
                  scratch_pool));
+  wc->conflicts = NULL;
 
   return SVN_NO_ERROR;
 }
@@ -2965,18 +2960,11 @@ execute(svnmover_wc_t *wc,
                                           arg[0]->el_rev /*from*/,
                                           arg[1]->el_rev /*to*/,
                                           arg[2]->el_rev /*yca*/,
-                                          iterpool, iterpool));
+                                          wc->pool, iterpool));
 
             if (svnmover_any_conflicts(wc->conflicts))
               {
                 SVN_ERR(svnmover_display_conflicts(wc->conflicts, iterpool));
-                return svn_error_createf(
-                         SVN_ERR_BRANCHING, NULL,
-                         _("Merge failed because of conflicts"));
-              }
-            else
-              {
-                SVN_DBG(("Merge completed: no conflicts"));
               }
 
           }



Mime
View raw message