You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/10/27 18:46:05 UTC

svn commit: r1634614 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_editor3.h libsvn_delta/compat3.c libsvn_delta/editor3.c svnmover/svnmover.c

Author: julianfoad
Date: Mon Oct 27 17:46:04 2014
New Revision: 1634614

URL: http://svn.apache.org/r1634614
Log:
On the 'move-tracking-2' branch: Remove the redundant 'kind' parameter from
svn_editor3_instantiate().

* subversion/include/private/svn_editor3.h
  (svn_editor3_instantiate): Remove 'new_kind' parameter.

* subversion/libsvn_delta/compat3.c
  (editor3_instantiate): Same.

* subversion/libsvn_delta/editor3.c
  (svn_editor3_instantiate,
   wrap_instantiate): Same.

* subversion/svnmover/svnmover.c
  (branch_merge_subtree_r): Adjust caller.

Modified:
    subversion/branches/move-tracking-2/subversion/include/private/svn_editor3.h
    subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3.c
    subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3.c
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_editor3.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_editor3.h?rev=1634614&r1=1634613&r2=1634614&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_editor3.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_editor3.h Mon Oct 27 17:46:04 2014
@@ -957,12 +957,10 @@ svn_editor3_add(svn_editor3_t *editor,
  * @see #svn_editor3_t
  *
  * ### Need to specify where the underlying FS node is to be "copied" from?
- * ### NEW_KIND is redundant: the existing element cannot change its kind.
  */
 svn_error_t *
 svn_editor3_instantiate(svn_editor3_t *editor,
                         svn_editor3_nbid_t eid,
-                        svn_node_kind_t new_kind,
                         svn_editor3_nbid_t new_parent_eid,
                         const char *new_name,
                         const svn_editor3_node_content_t *new_content);
@@ -1215,7 +1213,6 @@ typedef svn_error_t *(*svn_editor3_cb_ad
 typedef svn_error_t *(*svn_editor3_cb_instantiate_t)(
   void *baton,
   svn_editor3_nbid_t eid,
-  svn_node_kind_t new_kind,
   svn_editor3_nbid_t new_parent_eid,
   const char *new_name,
   const svn_editor3_node_content_t *new_content,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3.c?rev=1634614&r1=1634613&r2=1634614&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3.c Mon Oct 27 17:46:04 2014
@@ -4021,7 +4021,6 @@ editor3_add(void *baton,
 static svn_error_t *
 editor3_instantiate(void *baton,
                     svn_editor3_nbid_t eid,
-                    svn_node_kind_t new_kind,
                     svn_editor3_nbid_t new_parent_eid,
                     const char *new_name,
                     const svn_editor3_node_content_t *new_content,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3.c?rev=1634614&r1=1634613&r2=1634614&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3.c Mon Oct 27 17:46:04 2014
@@ -305,20 +305,17 @@ svn_editor3_add(svn_editor3_t *editor,
 svn_error_t *
 svn_editor3_instantiate(svn_editor3_t *editor,
                         svn_editor3_nbid_t local_nbid,
-                        svn_node_kind_t new_kind,
                         svn_editor3_nbid_t new_parent_nbid,
                         const char *new_name,
                         const svn_editor3_node_content_t *new_content)
 {
-  SVN_ERR_ASSERT(VALID_NODE_KIND(new_kind));
   SVN_ERR_ASSERT(VALID_EID(local_nbid));
   SVN_ERR_ASSERT(VALID_EID(new_parent_nbid));
   SVN_ERR_ASSERT(VALID_NAME(new_name));
   SVN_ERR_ASSERT(VALID_CONTENT(new_content));
-  SVN_ERR_ASSERT(new_content->kind == new_kind);
 
   DO_CALLBACK(editor, cb_instantiate,
-              5(local_nbid, new_kind,
+              4(local_nbid,
                 new_parent_nbid, new_name,
                 new_content));
   return SVN_NO_ERROR;
@@ -752,7 +749,6 @@ wrap_add(void *baton,
 static svn_error_t *
 wrap_instantiate(void *baton,
          svn_editor3_nbid_t local_nbid,
-         svn_node_kind_t new_kind,
          svn_editor3_nbid_t new_parent_nbid,
          const char *new_name,
          const svn_editor3_node_content_t *new_content,
@@ -760,11 +756,11 @@ wrap_instantiate(void *baton,
 {
   wrapper_baton_t *eb = baton;
 
-  dbg(eb, scratch_pool, "%s : instantiate(k=%s, p=%s, n=%s, c=...)",
-      nbid_str(local_nbid, scratch_pool), svn_node_kind_to_word(new_kind),
+  dbg(eb, scratch_pool, "%s : instantiate(p=%s, n=%s, c=...)",
+      nbid_str(local_nbid, scratch_pool),
       nbid_str(new_parent_nbid, scratch_pool), new_name);
   SVN_ERR(svn_editor3_instantiate(eb->wrapped_editor,
-                                  local_nbid, new_kind,
+                                  local_nbid,
                                   new_parent_nbid, new_name, new_content));
   return SVN_NO_ERROR;
 }

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=1634614&r1=1634613&r2=1634614&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Mon Oct 27 17:46:04 2014
@@ -529,16 +529,16 @@ branch_merge_subtree_r(svn_editor3_t *ed
         {
           SVN_DBG(("merged: e%d => <added>", eid));
 
-          /* In BRANCH, create an instance of the element EID with NEW_CONTENT.
+          /* In BRANCH, create an instance of the element EID with new content.
            *
            * Translated to old language, this means create a new node-copy
            * copied (branched) from the source-right version of the merge
            * (which is not specified here, but will need to be),
            * which may be in this branch or in another branch.
            */
-          SVN_ERR(svn_editor3_instantiate(editor, eid, result->content->kind,
-                                  result->parent_eid, result->name,
-                                  result->content));
+          SVN_ERR(svn_editor3_instantiate(editor, eid,
+                                          result->parent_eid, result->name,
+                                          result->content));
         }
     }