subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1173639 - in /subversion/trunk/subversion: libsvn_fs/fs-loader.h libsvn_fs_base/fs.c libsvn_fs_base/tree.c libsvn_fs_base/tree.h libsvn_fs_fs/fs.c libsvn_fs_fs/tree.c libsvn_fs_fs/tree.h
Date Wed, 21 Sep 2011 13:43:01 GMT
Author: pburba
Date: Wed Sep 21 13:43:01 2011
New Revision: 1173639

URL: http://svn.apache.org/viewvc?rev=1173639&view=rev
Log:
Follow-up to the revert of issue #3669 in r1173425: Revert parts of r1036078
which were not already reverted in r1173425.

* subversion/libsvn_fs/fs-loader.h
  (fs_vtable_t): Remove validate_mergeinfo function.

* subversion/libsvn_fs_base/fs.c
  (fs_vtable): Remove svn_fs_base__validate_mergeinfo function.

* subversion/libsvn_fs_base/tree.c
  (svn_fs_base__validate_mergeinfo): Remove svn_fs_validate_mergeinfo
   implementation.

* subversion/libsvn_fs_base/tree.h
  (svn_fs_base__validate_mergeinfo): Remove.

* subversion/libsvn_fs_fs/fs.c
  (fs_vtable): Remove svn_fs_fs__validate_mergeinfo function.

* subversion/libsvn_fs_fs/tree.c
  (svn_fs_fs__validate_mergeinfo): Remove svn_fs_validate_mergeinfo
   implementation.

* subversion/libsvn_fs_fs/tree.h
  (svn_fs_fs__validate_mergeinfo): Remove.

Modified:
    subversion/trunk/subversion/libsvn_fs/fs-loader.h
    subversion/trunk/subversion/libsvn_fs_base/fs.c
    subversion/trunk/subversion/libsvn_fs_base/tree.c
    subversion/trunk/subversion/libsvn_fs_base/tree.h
    subversion/trunk/subversion/libsvn_fs_fs/fs.c
    subversion/trunk/subversion/libsvn_fs_fs/tree.c
    subversion/trunk/subversion/libsvn_fs_fs/tree.h

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Wed Sep 21 13:43:01 2011
@@ -200,11 +200,6 @@ typedef struct fs_vtable_t
   svn_error_t *(*bdb_set_errcall)(svn_fs_t *fs,
                                   void (*handler)(const char *errpfx,
                                                   char *msg));
-  svn_error_t *(*validate_mergeinfo)(svn_mergeinfo_t *validated_mergeinfo,
-                                     svn_fs_t *fs,
-                                     svn_mergeinfo_t mergeinfo,
-                                     apr_pool_t *result_pool,
-                                     apr_pool_t *scratch_pool);
 } fs_vtable_t;
 
 

Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/fs.c Wed Sep 21 13:43:01 2011
@@ -496,7 +496,6 @@ static fs_vtable_t fs_vtable = {
   svn_fs_base__get_lock,
   svn_fs_base__get_locks,
   base_bdb_set_errcall,
-  svn_fs_base__validate_mergeinfo,
 };
 
 /* Where the format number is stored. */

Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.c Wed Sep 21 13:43:01 2011
@@ -4955,128 +4955,6 @@ base_node_origin_rev(svn_revnum_t *revis
 /* Mergeinfo Queries */
 
 
-/* Implements svn_fs_validate_mergeinfo. */
-svn_error_t *
-svn_fs_base__validate_mergeinfo(svn_mergeinfo_t *validated_mergeinfo,
-                                svn_fs_t *fs,
-                                svn_mergeinfo_t mergeinfo,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
-{
-  svn_mergeinfo_t filtered_mergeinfo;
-  apr_hash_t *rev_to_sources;
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-
-  /* A couple easy outs. */
-  if (mergeinfo == NULL)
-    {
-      *validated_mergeinfo = NULL;
-      return SVN_NO_ERROR;
-    }
-  else if (apr_hash_count(mergeinfo) == 0)
-    {
-      *validated_mergeinfo = apr_hash_make(result_pool);
-      return SVN_NO_ERROR;
-    }
-
-  filtered_mergeinfo = apr_hash_make(scratch_pool);
-  rev_to_sources = apr_hash_make(scratch_pool);
-
-  /* Since svn_fs_check_path needs an svn_fs_root_t based on a revision,
-     we convert MERGEINFO into a mapping of revisions to a hash of source
-     paths for efficiency. */
-  for (hi = apr_hash_first(scratch_pool, mergeinfo);
-       hi;
-       hi = apr_hash_next(hi))
-    {
-      const char *path = svn__apr_hash_index_key(hi);
-      apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
-      int i;
-
-      for (i = 0; i < rangelist->nelts; i++)
-        {
-          svn_merge_range_t *range =
-            APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
-          svn_revnum_t j;
-
-          for (j = range->start + 1; j <= range->end; j++)
-            {
-              apr_hash_t *paths_for_rev =
-                apr_hash_get(rev_to_sources, &j, sizeof(svn_revnum_t));
-
-              /* No hash associated with this rev yet? */
-              if (!paths_for_rev)
-                {
-                  svn_revnum_t *rev = apr_palloc(scratch_pool, sizeof(*rev));
-
-                  *rev = j;
-                  paths_for_rev = apr_hash_make(scratch_pool);
-                  apr_hash_set(rev_to_sources, rev,
-                               sizeof(svn_revnum_t), paths_for_rev);
-                }
-
-              apr_hash_set(paths_for_rev, path, APR_HASH_KEY_STRING, path);
-            }
-        }
-    }
-
-  iterpool = svn_pool_create(scratch_pool);
-
-  /* Validate the rev->source MERGEINFO equivalent hash, building the
-     validated mergeinfo as we go. */
-  for (hi = apr_hash_first(scratch_pool, rev_to_sources);
-       hi;
-       hi = apr_hash_next(hi))
-    {
-      const svn_revnum_t *rev = svn__apr_hash_index_key(hi);
-      apr_hash_t *paths = svn__apr_hash_index_val(hi);
-      apr_pool_t *inner_iterpool;
-      apr_hash_index_t *hi2;
-      svn_node_kind_t kind;
-      svn_fs_root_t *mergeinfo_rev_root;
-
-      svn_pool_clear(iterpool);
-      inner_iterpool = svn_pool_create(iterpool);
-
-      SVN_ERR(svn_fs_base__revision_root(&mergeinfo_rev_root, fs,
-                                         *rev, iterpool));
-
-       for (hi2 = apr_hash_first(iterpool, paths);
-            hi2;
-            hi2 = apr_hash_next(hi2))
-         {
-            const char *path = svn__apr_hash_index_key(hi2);
-
-            svn_pool_clear(inner_iterpool);
-            SVN_ERR(base_check_path(&kind, mergeinfo_rev_root,
-                                    path, inner_iterpool));
-            if (kind == svn_node_none)
-              {
-                apr_hash_set(paths, path, APR_HASH_KEY_STRING, NULL);
-              }
-            else
-              {
-                svn_mergeinfo_t good_mergeinfo_fragment;
-                const char *mergeinfo_str =
-                  apr_psprintf(inner_iterpool, "%s:%ld", path, *rev);
-
-                SVN_ERR(svn_mergeinfo_parse(&good_mergeinfo_fragment,
-                                            mergeinfo_str, scratch_pool));
-                SVN_ERR(svn_mergeinfo_merge(filtered_mergeinfo,
-                                            good_mergeinfo_fragment,
-                                            scratch_pool));
-              }
-         }
-      svn_pool_destroy(inner_iterpool);
-    }
-
-  svn_pool_destroy(iterpool);
-  *validated_mergeinfo = svn_mergeinfo_dup(filtered_mergeinfo, result_pool);
-  return SVN_NO_ERROR;
-}
-
-
 /* Examine directory NODE's immediately children for mergeinfo.
 
    For those which have explicit mergeinfo, add their mergeinfo to

Modified: subversion/trunk/subversion/libsvn_fs_base/tree.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.h?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.h Wed Sep 21 13:43:01 2011
@@ -91,14 +91,6 @@ svn_error_t *svn_fs_base__get_path_creat
                                                trail_t *trail,
                                                apr_pool_t *pool);
 
-/* Implements svn_fs_validate_mergeinfo. */
-svn_error_t *
-svn_fs_base__validate_mergeinfo(svn_mergeinfo_t *validated_mergeinfo,
-                                svn_fs_t *fs,
-                                svn_mergeinfo_t mergeinfo,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool);
-
 
 #ifdef __cplusplus
 }

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Wed Sep 21 13:43:01 2011
@@ -159,7 +159,6 @@ static fs_vtable_t fs_vtable = {
   svn_fs_fs__get_lock,
   svn_fs_fs__get_locks,
   fs_set_errcall,
-  svn_fs_fs__validate_mergeinfo,
 };
 
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Sep 21 13:43:01 2011
@@ -3353,127 +3353,6 @@ assemble_history(svn_fs_t *fs,
 /* mergeinfo queries */
 
 
-/* Implements svn_fs_validate_mergeinfo. */
-svn_error_t *
-svn_fs_fs__validate_mergeinfo(svn_mergeinfo_t *validated_mergeinfo,
-                              svn_fs_t *fs,
-                              svn_mergeinfo_t mergeinfo,
-                              apr_pool_t *result_pool,
-                              apr_pool_t *scratch_pool)
-{
-  svn_mergeinfo_t filtered_mergeinfo;
-  apr_hash_t *rev_to_sources;
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-
-  /* A couple easy outs. */
-  if (mergeinfo == NULL)
-    {
-      *validated_mergeinfo = NULL;
-      return SVN_NO_ERROR;
-    }
-  else if (apr_hash_count(mergeinfo) == 0)
-    {
-      *validated_mergeinfo = apr_hash_make(result_pool);
-      return SVN_NO_ERROR;
-    }
-
-  filtered_mergeinfo = apr_hash_make(scratch_pool);
-  rev_to_sources = apr_hash_make(scratch_pool);
-
-  /* Since svn_fs_check_path needs an svn_fs_root_t based on a revision,
-     we convert MERGEINFO into a mapping of revisions to a hash of source
-     paths for efficiency. */
-  for (hi = apr_hash_first(scratch_pool, mergeinfo);
-       hi;
-       hi = apr_hash_next(hi))
-    {
-      const char *path = svn__apr_hash_index_key(hi);
-      apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
-      int i;
-
-      for (i = 0; i < rangelist->nelts; i++)
-        {
-          svn_merge_range_t *range =
-            APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
-          svn_revnum_t j;
-
-          for (j = range->start + 1; j <= range->end; j++)
-            {
-              apr_hash_t *paths_for_rev =
-                apr_hash_get(rev_to_sources, &j, sizeof(svn_revnum_t));
-
-              /* No hash associated with this rev yet? */
-              if (!paths_for_rev)
-                {
-                  svn_revnum_t *rev = apr_palloc(scratch_pool, sizeof(*rev));
-
-                  *rev = j;
-                  paths_for_rev = apr_hash_make(scratch_pool);
-                  apr_hash_set(rev_to_sources, rev,
-                               sizeof(svn_revnum_t), paths_for_rev);
-                }
-
-              apr_hash_set(paths_for_rev, path, APR_HASH_KEY_STRING, path);
-            }
-        }
-    }
-
-  iterpool = svn_pool_create(scratch_pool);
-
-  /* Validate the rev->source MERGEINFO equivalent hash, building the
-     validated mergeinfo as we go. */
-  for (hi = apr_hash_first(scratch_pool, rev_to_sources);
-       hi;
-       hi = apr_hash_next(hi))
-    {
-      const svn_revnum_t *rev = svn__apr_hash_index_key(hi);
-      apr_hash_t *paths = svn__apr_hash_index_val(hi);
-      apr_pool_t *inner_iterpool;
-      apr_hash_index_t *hi2;
-      svn_node_kind_t kind;
-      svn_fs_root_t *mergeinfo_rev_root;
-
-      svn_pool_clear(iterpool);
-      inner_iterpool = svn_pool_create(iterpool);
-
-      SVN_ERR(svn_fs_fs__revision_root(&mergeinfo_rev_root, fs,
-                                       *rev, iterpool));
-
-       for (hi2 = apr_hash_first(iterpool, paths);
-            hi2;
-            hi2 = apr_hash_next(hi2))
-         {
-            const char *path = svn__apr_hash_index_key(hi2);
-
-            svn_pool_clear(inner_iterpool);
-            SVN_ERR(svn_fs_fs__check_path(&kind, mergeinfo_rev_root,
-                                          path, inner_iterpool));
-            if (kind == svn_node_none)
-              {
-                apr_hash_set(paths, path, APR_HASH_KEY_STRING, NULL);
-              }
-            else
-              {
-                svn_mergeinfo_t good_mergeinfo_fragment;
-                const char *mergeinfo_str =
-                  apr_psprintf(inner_iterpool, "%s:%ld", path, *rev);
-
-                SVN_ERR(svn_mergeinfo_parse(&good_mergeinfo_fragment,
-                                            mergeinfo_str, scratch_pool));
-                SVN_ERR(svn_mergeinfo_merge(filtered_mergeinfo,
-                                            good_mergeinfo_fragment,
-                                            scratch_pool));
-              }
-         }
-      svn_pool_destroy(inner_iterpool);
-    }
-
-  svn_pool_destroy(iterpool);
-  *validated_mergeinfo = svn_mergeinfo_dup(filtered_mergeinfo, result_pool);
-  return SVN_NO_ERROR;
-}
-
 /* DIR_DAG is a directory DAG node which has mergeinfo in its
    descendants.  This function iterates over its children.  For each
    child with immediate mergeinfo, it adds its mergeinfo to

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.h?rev=1173639&r1=1173638&r2=1173639&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.h Wed Sep 21 13:43:01 2011
@@ -71,14 +71,6 @@ svn_fs_fs__node_created_rev(svn_revnum_t
                             const char *path,
                             apr_pool_t *pool);
 
-/* Implements svn_fs_validate_mergeinfo. */
-svn_error_t *
-svn_fs_fs__validate_mergeinfo(svn_mergeinfo_t *validated_mergeinfo,
-                              svn_fs_t *fs,
-                              svn_mergeinfo_t mergeinfo,
-                              apr_pool_t *result_pool,
-                              apr_pool_t *scratch_pool);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */



Mime
View raw message