You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/01/15 20:30:15 UTC

svn commit: r1433597 - in /subversion/trunk/subversion/libsvn_client: merge.c repos_diff.c

Author: rhuijben
Date: Tue Jan 15 19:30:14 2013
New Revision: 1433597

URL: http://svn.apache.org/viewvc?rev=1433597&view=rev
Log:
Make the skip handling in the repos_diff code more explicit, by just
skipping what we document as to be skipped. This makes more of the merge
skipping code self documenting.

* subversion/libsvn_client/merge.c
  (merge_dir_added,
   merge_dir_opened): Request skipping children for tree conflict.

* subversion/libsvn_client/repos_diff.c
  (delete_entry,
   add_directory,
   open_directory,
   add_file,
   open_file,
   close_directory): Only automatically skip children of parent if we should,
     instead of also for tree conflicts and on some cases where the node itself
     is skipped. Note that this is just an internal api.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/libsvn_client/repos_diff.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1433597&r1=1433596&r2=1433597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Jan 15 19:30:14 2013
@@ -2498,6 +2498,7 @@ merge_dir_added(svn_wc_notify_state_t *s
                                        svn_wc_conflict_action_add,
                                        svn_wc_conflict_reason_obstructed));
           *tree_conflicted = TRUE;
+          *skip_children = TRUE;
           *state = svn_wc_notify_state_obstructed;
         }
       break;
@@ -2774,6 +2775,7 @@ merge_dir_opened(svn_boolean_t *tree_con
                                 svn_wc_conflict_action_edit,
                                 svn_wc_conflict_reason_replaced));
           *tree_conflicted = TRUE;
+          *skip_children = TRUE;
         }
 
       /* If we're trying to open a directory that's locally deleted,
@@ -2804,6 +2806,7 @@ merge_dir_opened(svn_boolean_t *tree_con
           SVN_ERR(tree_conflict(merge_b, local_abspath, svn_node_dir,
                                 svn_wc_conflict_action_edit, reason));
           *tree_conflicted = TRUE;
+          *skip_children = TRUE;
         }
     }
 

Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1433597&r1=1433596&r2=1433597&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Tue Jan 15 19:30:14 2013
@@ -597,9 +597,8 @@ delete_entry(const char *path,
   svn_boolean_t tree_conflicted = FALSE;
   apr_pool_t *scratch_pool;
 
-  /* Skip *everything* within a newly tree-conflicted directory,
-   * and directories the children of which should be skipped. */
-  if (pb->skip || pb->tree_conflicted || pb->skip_children)
+  /* Process skips. */
+  if (pb->skip_children)
     return SVN_NO_ERROR;
 
   scratch_pool = svn_pool_create(eb->pool);
@@ -671,9 +670,10 @@ add_directory(const char *path,
 
   /* Skip *everything* within a newly tree-conflicted directory,
    * and directories the children of which should be skipped. */
-  if (pb->skip || pb->tree_conflicted || pb->skip_children)
+  if (pb->skip_children)
     {
       db->skip = TRUE;
+      db->skip_children = TRUE;
       return SVN_NO_ERROR;
     }
 
@@ -755,11 +755,11 @@ open_directory(const char *path,
 
   *child_baton = db;
 
-  /* Skip *everything* within a newly tree-conflicted directory
-   * and directories the children of which should be skipped. */
-  if (pb->skip || pb->tree_conflicted || pb->skip_children)
+  /* Process Skips. */
+  if (pb->skip_children)
     {
       db->skip = TRUE;
+      db->skip_children = TRUE;
       return SVN_NO_ERROR;
     }
 
@@ -789,9 +789,8 @@ add_file(const char *path,
   fb = make_file_baton(path, TRUE, pb->edit_baton, pool);
   *file_baton = fb;
 
-  /* Skip *everything* within a newly tree-conflicted directory.
-   * and directories the children of which should be skipped. */
-  if (pb->skip || pb->tree_conflicted || pb->skip_children)
+  /* Process Skips. */
+  if (pb->skip_children)
     {
       fb->skip = TRUE;
       return SVN_NO_ERROR;
@@ -816,9 +815,8 @@ open_file(const char *path,
   fb = make_file_baton(path, FALSE, pb->edit_baton, pool);
   *file_baton = fb;
 
-  /* Skip *everything* within a newly tree-conflicted directory
-   * and directories the children of which should be skipped. */
-  if (pb->skip || pb->tree_conflicted || pb->skip_children)
+  /* Process Skips. */
+  if (pb->skip_children)
     {
       fb->skip = TRUE;
       return SVN_NO_ERROR;
@@ -1097,16 +1095,9 @@ close_directory(void *dir_baton,
   apr_pool_t *scratch_pool;
   apr_hash_t *pristine_props;
 
-  /* Skip *everything* within a newly tree-conflicted directory. */
-  if (db->skip)
-    {
-      svn_pool_destroy(db->pool);
-      return SVN_NO_ERROR;
-    }
-
   scratch_pool = db->pool;
 
-  if (db->has_propchange)
+  if (db->has_propchange && !db->skip)
     {
       if (db->added)
         {
@@ -1180,7 +1171,7 @@ close_directory(void *dir_baton,
 
   /* Notify about this directory itself (unless it was added, in which
    * case the notification was done at that time). */
-  if (!db->added && eb->notify_func)
+  if (!db->added && eb->notify_func && !db->skip)
     {
       svn_wc_notify_t *notify;
       svn_wc_notify_action_t action;