subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1409559 - /subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c
Date Wed, 14 Nov 2012 23:37:28 GMT
Author: julianfoad
Date: Wed Nov 14 23:37:27 2012
New Revision: 1409559

URL: http://svn.apache.org/viewvc?rev=1409559&view=rev
Log:
On the 'tree-read-api' branch:

* subversion/libsvn_subr/tree.c
  (walk_two_trees): Remove a wrong assertion that a node can't change kind.

Modified:
    subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c

Modified: subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c?rev=1409559&r1=1409558&r2=1409559&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_subr/tree.c Wed Nov 14 23:37:27 2012
@@ -203,7 +203,6 @@ walk_two_trees(svn_tree_node_t *node1,
   if (node1 && node2)
     {
       assert(strcmp(relpath1, relpath2) == 0);  /* ### until move/rename support */
-      assert(kind1 == kind2);  /* In Subversion a node can't change kind */
     }
 
   SVN_ERR(walk_func(node1, node2, walk_baton, scratch_pool));
@@ -211,9 +210,13 @@ walk_two_trees(svn_tree_node_t *node1,
   SVN_DBG(("walk_two_trees: kind %d/%d, '%s'\n",
            kind1, kind2, relpath1 ? relpath1 : relpath2));
 
-  /* Recurse, if it's a directory on BOTH sides */
+  /* Recurse, if it's a directory on BOTH sides.  (If it's a directory on
+   * just one side (it's a replacement), we want to treat that just the same
+   * as a deleted or added directory: it's up to the callback to traverse
+   * the singleton if it wants to.) */
   if (node1 && node2
       && kind1 == svn_node_dir
+      && kind2 == svn_node_dir
       && depth >= svn_depth_files)
     {
       apr_hash_t *children1, *children2;



Mime
View raw message