subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1692517 - in /subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer: logic.c mergeinfo-normalizer.h wc_mergeinfo.c
Date Fri, 24 Jul 2015 13:49:34 GMT
Author: stefan2
Date: Fri Jul 24 13:49:33 2015
New Revision: 1692517

URL: http://svn.apache.org/r1692517
Log:
On the svn-mergeinfo-normalizer branch:
Final preparations for the "natural branch history" detection feature,
making the FS paths corresponding to the working copy nodes available
in the remove_lines function.

* tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
  (svn_min__get_mergeinfo_pair): Add FS_PATH return argument.

* tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c
  (svn_min__get_mergeinfo_pair): Extend implementation accordingly.

* tools/client-side/svn-mergeinfo-normalizer/logic.c
  (remove_lines): Add FS_PATH parameter and derive the parent FS path.
  (normalize): Request and pass the extra parameter along.

Modified:
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/logic.c
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.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=1692517&r1=1692516&r2=1692517&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 24 13:49:33 2015
@@ -279,6 +279,7 @@ get_parent_path(const char *child,
 static svn_error_t *
 remove_lines(svn_min__log_t *log,
              svn_min__branch_lookup_t *lookup,
+             const char *fs_path,
              const char *relpath,
              svn_mergeinfo_t parent_mergeinfo,
              svn_mergeinfo_t subtree_mergeinfo,
@@ -294,7 +295,7 @@ remove_lines(svn_min__log_t *log,
                              scratch_pool);
   for (i = 0; i < sorted_mi->nelts; ++i)
     {
-      const char *parent_path, *subtree_path;
+      const char *parent_path, *subtree_path, *parent_fs_path;
       svn_rangelist_t *parent_ranges, *subtree_ranges, *reverse_ranges;
       svn_rangelist_t *subtree_only, *parent_only;
       svn_rangelist_t *operative_outside_subtree, *operative_in_subtree;
@@ -316,6 +317,7 @@ remove_lines(svn_min__log_t *log,
 
       /* Find the parent m/i entry for the same branch. */
       parent_path = get_parent_path(subtree_path, relpath, iterpool);
+      parent_fs_path = get_parent_path(fs_path, relpath, iterpool);
       subtree_ranges = item->value;
       parent_ranges = svn_hash_gets(parent_mergeinfo, parent_path);
 
@@ -661,7 +663,7 @@ normalize(apr_array_header_t *wc_mergein
       progress.nodes_todo = i;
 
       /* Get the relevant mergeinfo. */
-      svn_min__get_mergeinfo_pair(&parent_path, &relpath,
+      svn_min__get_mergeinfo_pair(&fs_path, &parent_path, &relpath,
                                   &parent_mergeinfo, &subtree_mergeinfo,
                                   wc_mergeinfo, i);
       SVN_ERR(show_elision_header(parent_path, relpath, opt_state,
@@ -679,9 +681,9 @@ normalize(apr_array_header_t *wc_mergein
           subtree_mergeinfo_copy = svn_mergeinfo_dup(subtree_mergeinfo,
                                                      iterpool);
 
-          SVN_ERR(remove_lines(log, lookup, relpath, parent_mergeinfo_copy,
-                               subtree_mergeinfo_copy, opt_state,
-                               iterpool));
+          SVN_ERR(remove_lines(log, lookup, fs_path, relpath,
+                               parent_mergeinfo_copy, subtree_mergeinfo_copy,
+                               opt_state, iterpool));
 
           /* If all sub-tree mergeinfo could be elided, clear it.  Update
              the parent mergeinfo in case we moved some up the tree. */

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h?rev=1692517&r1=1692516&r2=1692517&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
Fri Jul 24 13:49:33 2015
@@ -145,7 +145,8 @@ svn_min__get_mergeinfo_path(apr_array_he
                             int idx);
 
 void
-svn_min__get_mergeinfo_pair(const char **parent_path,
+svn_min__get_mergeinfo_pair(const char **fs_path,
+                            const char **parent_path,
                             const char **subtree_relpath,
                             svn_mergeinfo_t *parent_mergeinfo,
                             svn_mergeinfo_t *subtree_mergeinfo,

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c?rev=1692517&r1=1692516&r2=1692517&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c
Fri Jul 24 13:49:33 2015
@@ -241,7 +241,8 @@ svn_min__common_parent(apr_array_header_
 }
 
 void
-svn_min__get_mergeinfo_pair(const char **parent_path,
+svn_min__get_mergeinfo_pair(const char **fs_path,
+                            const char **parent_path,
                             const char **subtree_relpath,
                             svn_mergeinfo_t *parent_mergeinfo,
                             svn_mergeinfo_t *subtree_mergeinfo,
@@ -251,6 +252,7 @@ svn_min__get_mergeinfo_pair(const char *
   mergeinfo_t *entry;
   if (idx < 0 || mergeinfo->nelts <= idx)
     {
+      *fs_path = "";
       *parent_path = "";
       *subtree_relpath = "";
       *parent_mergeinfo = NULL;
@@ -260,6 +262,7 @@ svn_min__get_mergeinfo_pair(const char *
     }
 
   entry = APR_ARRAY_IDX(mergeinfo, idx, mergeinfo_t *);
+  *fs_path = entry->fs_path;
   *subtree_mergeinfo = entry->mergeinfo;
 
   if (!entry->parent)



Mime
View raw message