subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1498645 - in /subversion/branches/fsfs-format7/subversion/libsvn_fs_x: fs.h fs_x.c fs_x.h low_level.c low_level.h transaction.c tree.c
Date Mon, 01 Jul 2013 19:51:06 GMT
Author: stefan2
Date: Mon Jul  1 19:51:05 2013
New Revision: 1498645

URL: http://svn.apache.org/r1498645
Log:
On the fsfs-format7 branch:  Remove the SVN_FS_FS__MIN_MERGEINFO_FORMAT
flags from FSX because it always support merge info.  Remove all
references to that flag and the obsolete FSFS-fallback behavior.

* subversion/libsvn_fs_x/fs.h
  (SVN_FS_FS__MIN_MERGEINFO_FORMAT): drop

* subversion/libsvn_fs_x/fs_x.h
  (svn_fs_x__fs_supports_mergeinfo): drop

* subversion/libsvn_fs_x/fs_x.c
  (svn_fs_x__fs_supports_mergeinfo): drop

* subversion/libsvn_fs_x/low_level.h
  (svn_fs_x__write_noderev): drop the include_mergeinfo parameter

* subversion/libsvn_fs_x/low_level.c
  (svn_fs_x__write_noderev): drop the include_mergeinfo parameter

* subversion/libsvn_fs_x/transaction.c
  (svn_fs_x__put_node_revision,
   write_final_rev): update callers

* subversion/libsvn_fs_x/tree.c
  (x_change_node_prop,
   merge,
   x_delete_node,
   copy_helper): remove check
  (x_get_mergeinfo): remove check & fallback code

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.h
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
    subversion/branches/fsfs-format7/subversion/libsvn_fs_x/tree.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h Mon Jul  1 19:51:05 2013
@@ -126,10 +126,6 @@ extern "C" {
    using a transaction sequence in the txn-current file. */
 #define SVN_FS_FS__MIN_TXN_CURRENT_FORMAT 3
 
-/* The minimum format number that maintains minfo-here and minfo-count
-   noderev fields. */
-#define SVN_FS_FS__MIN_MERGEINFO_FORMAT 3
-
 /* The minimum format number that stores node kinds in changed-paths lists. */
 #define SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT 4
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.c Mon Jul  1 19:51:05 2013
@@ -176,13 +176,6 @@ check_format(int format)
      SVN_FS_FS__FORMAT_NUMBER, format);
 }
 
-svn_boolean_t
-svn_fs_x__fs_supports_mergeinfo(svn_fs_t *fs)
-{
-  fs_x_data_t *ffd = fs->fsap_data;
-  return ffd->format >= SVN_FS_FS__MIN_MERGEINFO_FORMAT;
-}
-
 /* Find the youngest revision in a repository at path FS_PATH and
    return it in *YOUNGEST_P.  Perform temporary allocations in
    POOL. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.h?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs_x.h Mon Jul  1 19:51:05 2013
@@ -107,9 +107,6 @@ svn_error_t *svn_fs_x__file_checksum(svn
                                      svn_checksum_kind_t kind,
                                      apr_pool_t *pool);
 
-/* Return whether or not the given FS supports mergeinfo metadata. */
-svn_boolean_t svn_fs_x__fs_supports_mergeinfo(svn_fs_t *fs);
-
 /* Create a fs_fs fileysystem referenced by FS at path PATH.  Get any
    temporary allocations from POOL.
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c Mon Jul  1 19:51:05
2013
@@ -558,7 +558,6 @@ svn_error_t *
 svn_fs_x__write_noderev(svn_stream_t *outfile,
                         node_revision_t *noderev,
                         int format,
-                        svn_boolean_t include_mergeinfo,
                         apr_pool_t *pool)
 {
   SVN_ERR(svn_stream_printf(outfile, pool, HEADER_ID ": %s\n",
@@ -609,16 +608,13 @@ svn_fs_x__write_noderev(svn_stream_t *ou
   if (noderev->is_fresh_txn_root)
     SVN_ERR(svn_stream_puts(outfile, HEADER_FRESHTXNRT ": y\n"));
 
-  if (include_mergeinfo)
-    {
-      if (noderev->mergeinfo_count > 0)
-        SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": %"
-                                  APR_INT64_T_FMT "\n",
-                                  noderev->mergeinfo_count));
+  if (noderev->mergeinfo_count > 0)
+    SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": %"
+                              APR_INT64_T_FMT "\n",
+                              noderev->mergeinfo_count));
 
-      if (noderev->has_mergeinfo)
-        SVN_ERR(svn_stream_puts(outfile, HEADER_MINFO_HERE ": y\n"));
-    }
+  if (noderev->has_mergeinfo)
+    SVN_ERR(svn_stream_puts(outfile, HEADER_MINFO_HERE ": y\n"));
 
   return svn_stream_puts(outfile, "\n");
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.h?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.h Mon Jul  1 19:51:05
2013
@@ -79,13 +79,11 @@ svn_fs_x__read_noderev(node_revision_t *
                        apr_pool_t *pool);
 
 /* Write the node-revision NODEREV into the stream OUTFILE, compatible with
-   filesystem format FORMAT.  Only write mergeinfo-related metadata if
-   INCLUDE_MERGEINFO is true.  Temporary allocations are from POOL. */
+   filesystem format FORMAT.  Temporary allocations are from POOL. */
 svn_error_t *
 svn_fs_x__write_noderev(svn_stream_t *outfile,
                         node_revision_t *noderev,
                         int format,
-                        svn_boolean_t include_mergeinfo,
                         apr_pool_t *pool);
 
 /* This type enumerates all forms of representations that we support. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c Mon Jul  1 19:51:05
2013
@@ -553,9 +553,7 @@ svn_fs_x__put_node_revision(svn_fs_t *fs
 
   SVN_ERR(svn_fs_x__write_noderev(svn_stream_from_aprfile2(noderev_file, TRUE,
                                                            pool),
-                                  noderev, ffd->format,
-                                  svn_fs_x__fs_supports_mergeinfo(fs),
-                                  pool));
+                                  noderev, ffd->format, pool));
 
   SVN_ERR(svn_io_file_close(noderev_file, pool));
 
@@ -2782,9 +2780,7 @@ write_final_rev(const svn_fs_id_t **new_
     SVN_ERR(validate_root_noderev(fs, noderev, rev, pool));
 
   SVN_ERR(svn_fs_x__write_noderev(svn_stream_from_aprfile2(file, TRUE, pool),
-                                  noderev, ffd->format,
-                                  svn_fs_x__fs_supports_mergeinfo(fs),
-                                  pool));
+                                  noderev, ffd->format, pool));
 
   /* reference the root noderev from the log-to-phys index */
   rev_item.revision = SVN_INVALID_REVNUM;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/tree.c?rev=1498645&r1=1498644&r2=1498645&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/tree.c Mon Jul  1 19:51:05 2013
@@ -1476,8 +1476,7 @@ x_change_node_prop(svn_fs_root_t *root,
   if (! proplist)
     proplist = apr_hash_make(pool);
 
-  if (svn_fs_x__fs_supports_mergeinfo(root->fs)
-      && strcmp (name, SVN_PROP_MERGEINFO) == 0)
+  if (strcmp(name, SVN_PROP_MERGEINFO) == 0)
     {
       apr_int64_t increment = 0;
       svn_boolean_t had_mergeinfo;
@@ -1601,7 +1600,6 @@ merge(svn_stringbuf_t *conflict_p,
   svn_fs_t *fs;
   apr_pool_t *iterpool;
   apr_int64_t mergeinfo_increment = 0;
-  svn_boolean_t fs_supports_mergeinfo;
 
   /* Make sure everyone comes from the same filesystem. */
   fs = svn_fs_x__dag_get_fs(ancestor);
@@ -1749,8 +1747,6 @@ merge(svn_stringbuf_t *conflict_p,
   SVN_ERR(svn_fs_x__dag_dir_entries(&t_entries, target, pool));
   SVN_ERR(svn_fs_x__dag_dir_entries(&a_entries, ancestor, pool));
 
-  fs_supports_mergeinfo = svn_fs_x__fs_supports_mergeinfo(fs);
-
   /* for each entry E in a_entries... */
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, a_entries);
@@ -1779,16 +1775,15 @@ merge(svn_stringbuf_t *conflict_p,
          process, but the transaction did not touch this entry. */
       else if (t_entry && svn_fs_x__id_eq(a_entry->id, t_entry->id))
         {
+          apr_int64_t mergeinfo_start;
+          apr_int64_t mergeinfo_end;
+
           dag_node_t *t_ent_node;
           SVN_ERR(svn_fs_x__dag_get_node(&t_ent_node, fs,
                                          t_entry->id, iterpool));
-          if (fs_supports_mergeinfo)
-            {
-              apr_int64_t mergeinfo_start;
-              SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_start,
-                                                         t_ent_node));
-              mergeinfo_increment -= mergeinfo_start;
-            }
+          SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_start,
+                                                      t_ent_node));
+          mergeinfo_increment -= mergeinfo_start;
 
           if (s_entry)
             {
@@ -1796,13 +1791,9 @@ merge(svn_stringbuf_t *conflict_p,
               SVN_ERR(svn_fs_x__dag_get_node(&s_ent_node, fs,
                                              s_entry->id, iterpool));
 
-              if (fs_supports_mergeinfo)
-                {
-                  apr_int64_t mergeinfo_end;
-                  SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_end,
-                                                             s_ent_node));
-                  mergeinfo_increment += mergeinfo_end;
-                }
+              SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_end,
+                                                        s_ent_node));
+              mergeinfo_increment += mergeinfo_end;
 
               SVN_ERR(svn_fs_x__dag_set_entry(target, name,
                                               s_entry->id,
@@ -1873,8 +1864,7 @@ merge(svn_stringbuf_t *conflict_p,
                         txn_id,
                         &sub_mergeinfo_increment,
                         iterpool));
-          if (fs_supports_mergeinfo)
-            mergeinfo_increment += sub_mergeinfo_increment;
+          mergeinfo_increment += sub_mergeinfo_increment;
         }
 
       /* We've taken care of any possible implications E could have.
@@ -1894,6 +1884,7 @@ merge(svn_stringbuf_t *conflict_p,
       const char *name = svn__apr_hash_index_key(hi);
       apr_ssize_t klen = svn__apr_hash_index_klen(hi);
       dag_node_t *s_ent_node;
+      apr_int64_t mergeinfo_s;
 
       svn_pool_clear(iterpool);
 
@@ -1909,13 +1900,8 @@ merge(svn_stringbuf_t *conflict_p,
 
       SVN_ERR(svn_fs_x__dag_get_node(&s_ent_node, fs,
                                      s_entry->id, iterpool));
-      if (fs_supports_mergeinfo)
-        {
-          apr_int64_t mergeinfo_s;
-          SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_s,
-                                                    s_ent_node));
-          mergeinfo_increment += mergeinfo_s;
-        }
+      SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_s, s_ent_node));
+      mergeinfo_increment += mergeinfo_s;
 
       SVN_ERR(svn_fs_x__dag_set_entry
               (target, s_entry->name, s_entry->id, s_entry->kind,
@@ -1925,10 +1911,9 @@ merge(svn_stringbuf_t *conflict_p,
 
   SVN_ERR(svn_fs_x__dag_update_ancestry(target, source, pool));
 
-  if (fs_supports_mergeinfo)
-    SVN_ERR(svn_fs_x__dag_increment_mergeinfo_count(target,
-                                                    mergeinfo_increment,
-                                                    pool));
+  SVN_ERR(svn_fs_x__dag_increment_mergeinfo_count(target,
+                                                  mergeinfo_increment,
+                                                  pool));
 
   if (mergeinfo_increment_out)
     *mergeinfo_increment_out = mergeinfo_increment;
@@ -2324,9 +2309,8 @@ x_delete_node(svn_fs_root_t *root,
 
   /* Make the parent directory mutable, and do the deletion.  */
   SVN_ERR(make_path_mutable(root, parent_path->parent, path, pool));
-  if (svn_fs_x__fs_supports_mergeinfo(root->fs))
-    SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_count,
-                                              parent_path->node));
+  SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_count,
+                                            parent_path->node));
   SVN_ERR(svn_fs_x__dag_delete(parent_path->parent->node,
                                parent_path->entry,
                                txn_id, pool));
@@ -2429,9 +2413,8 @@ copy_helper(svn_fs_root_t *from_root,
       if (to_parent_path->node)
         {
           kind = svn_fs_path_change_replace;
-          if (svn_fs_x__fs_supports_mergeinfo(to_root->fs))
-            SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_start,
-                                                      to_parent_path->node));
+          SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_start,
+                                                    to_parent_path->node));
         }
       else
         {
@@ -2439,9 +2422,7 @@ copy_helper(svn_fs_root_t *from_root,
           mergeinfo_start = 0;
         }
 
-      if (svn_fs_x__fs_supports_mergeinfo(to_root->fs))
-        SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_end,
-                                                  from_node));
+      SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_end, from_node));
 
       /* Make sure the target node's parents are mutable.  */
       SVN_ERR(make_path_mutable(to_root, to_parent_path->parent,
@@ -2463,8 +2444,7 @@ copy_helper(svn_fs_root_t *from_root,
                                           parent_path_path(to_parent_path,
                                                            pool), pool));
 
-      if (svn_fs_x__fs_supports_mergeinfo(to_root->fs)
-          && mergeinfo_start != mergeinfo_end)
+      if (mergeinfo_start != mergeinfo_end)
         SVN_ERR(increment_mergeinfo_up_tree(to_parent_path->parent,
                                             mergeinfo_end - mergeinfo_start,
                                             pool));
@@ -4078,20 +4058,10 @@ x_get_mergeinfo(svn_mergeinfo_catalog_t 
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
-  fs_x_data_t *ffd = root->fs->fsap_data;
-
   /* We require a revision root. */
   if (root->is_txn_root)
     return svn_error_create(SVN_ERR_FS_NOT_REVISION_ROOT, NULL, NULL);
 
-  /* We have to actually be able to find the mergeinfo metadata! */
-  if (! svn_fs_x__fs_supports_mergeinfo(root->fs))
-    return svn_error_createf
-      (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-       _("Querying mergeinfo requires version %d of the FSFS filesystem "
-         "schema; filesystem '%s' uses only version %d"),
-       SVN_FS_FS__MIN_MERGEINFO_FORMAT, root->fs->path, ffd->format);
-
   /* Retrieve a path -> mergeinfo hash mapping. */
   return get_mergeinfos_for_paths(root, catalog, paths,
                                   inherit,



Mime
View raw message