subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1689109 - /subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
Date Fri, 03 Jul 2015 23:54:39 GMT
Author: stefan2
Date: Fri Jul  3 23:54:39 2015
New Revision: 1689109

URL: http://svn.apache.org/r1689109
Log:
On the svn-mergeinfo-normalizer branch:
In verbose mode, also log the removal of obsolete branch mergeinfo.

* tools/client-side/svn-mergeinfo-normalizer/logic.c
  (show_removed_branch): New console output function.
  (remove_obsolete_lines): Invoke the new function.
  (normalize): Don't remove branches from the parent mergeinfo as it
               only confuses the verbose output and does not contribute
               to the elision process anymore.

Modified:
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c?rev=1689109&r1=1689108&r2=1689109&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
Fri Jul  3 23:54:39 2015
@@ -274,6 +274,20 @@ typedef struct progress_t
 } progress_t;
 
 static svn_error_t *
+show_removed_branch(const char *subtree_path,
+                    svn_boolean_t local_only,
+                    svn_min__opt_state_t *opt_state,
+                    apr_pool_t *scratch_pool)
+{
+  if (opt_state->verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool,
+                               _("    remove deleted branch %s\n"),
+                               subtree_path));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 remove_obsolete_lines(svn_min__branch_lookup_t *lookup,
                       svn_mergeinfo_t mergeinfo,
                       svn_min__opt_state_t *opt_state,
@@ -305,7 +319,10 @@ remove_obsolete_lines(svn_min__branch_lo
       SVN_ERR(svn_min__branch_lookup(&deleted, lookup, path, local_only,
                                      iterpool));
       if (deleted)
-        APR_ARRAY_PUSH(to_remove, const char *) = path;
+        {
+          APR_ARRAY_PUSH(to_remove, const char *) = path;
+          SVN_ERR(show_removed_branch(path, local_only, opt_state, iterpool));
+        }
     }
 
   for (i = 0; i < to_remove->nelts; ++i)
@@ -548,12 +565,6 @@ normalize(apr_array_header_t *wc_mergein
           svn_mergeinfo_t parent_mergeinfo_copy;
           svn_mergeinfo_t subtree_mergeinfo_copy;
 
-          /* Quickly eliminate entries for known deleted branches such that
-             parent and sub-node mergeinfo align again. */
-          SVN_ERR(remove_obsolete_lines(lookup, parent_mergeinfo,
-                                        opt_state, &progress, TRUE,
-                                        iterpool));
-
           /* Try to elide the mergeinfo for all branches. */
           parent_mergeinfo_copy = svn_mergeinfo_dup(parent_mergeinfo,
                                                     iterpool);



Mime
View raw message