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 2015/09/17 17:06:25 UTC

svn commit: r1703644 - /subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Author: julianfoad
Date: Thu Sep 17 15:06:22 2015
New Revision: 1703644

URL: http://svn.apache.org/r1703644
Log:
On the 'move-tracking-2' branch: When a subtree is deleted, let 'svnmover
diff' not show every element as deleted independently, but mark the deleted
children as less important. For now, we do this using notification 'd' instead of
'D'.

Later we will probably want to omit those lines altogether, but for now I
prefer to see them.

* subversion/svnmover/svnmover.c
  (show_subtree_diff): Display 'd' instead of 'D' when a deleted element was
    the child of another deleted element.

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

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=1703644&r1=1703643&r2=1703644&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Sep 17 15:06:22 2015
@@ -1824,6 +1824,19 @@ show_subtree_diff(svn_editor3_t *editor,
       svn_branch_el_rev_content_t *e0 = item->e0, *e1 = item->e1;
       char status_mod = (e0 && e1) ? 'M' : e0 ? 'D' : 'A';
 
+      /* For a deleted element whose parent was also deleted, mark it is
+         less important, somehow. (Or we could omit it entirely.) */
+      if (status_mod == 'D')
+        {
+          diff_item_t *parent_item
+            = svn_int_hash_get(diff_changes, e0->parent_eid);
+
+          /* If the (left-hand) parent has been deleted (thus it must have
+             changed, given that we currently flattem the trees before diffing them)... */
+          if (parent_item && ! parent_item->e1)
+            status_mod = 'd';
+        }
+
       if (the_ui_mode == UI_MODE_PATHS)
         {
           const char *major_path = (e1 ? item->relpath1 : item->relpath0);