Author: stefan2
Date: Wed Apr  1 22:52:26 2015
New Revision: 1670789

URL: http://svn.apache.org/r1670789
Log:
On the fsx-1.10 branch:
Remove all references to svn_fs_path_change_reset from FSX code because
there is no way to create a cache of that type.

* subversion/libsvn_fs_x/low_level.c
  (ACTION_RESET): Remove because it is unused.
  (read_change,
   write_change_entry): Remove (de-)serialization support
                        svn_fs_path_change_reset.

* subversion/libsvn_fs_x/transaction.c
  (fold_change): Remove handling of svn_fs_path_change_reset.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/low_level.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/transaction.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/low_level.c?rev=1670789&r1=1670788&r2=1670789&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/low_level.c Wed Apr  1 
22:52:26 2015
@@ -56,7 +56,6 @@
 #define ACTION_ADD         "add"
 #define ACTION_DELETE      "delete"
 #define ACTION_REPLACE     "replace"
-#define ACTION_RESET       "reset"
 
 /* True and False flags. */
 #define FLAG_TRUE          "true"
@@ -845,10 +844,6 @@ read_change(svn_fs_x__change_t **change_
     {
       change->change_kind = svn_fs_path_change_replace;
     }
-  else if (strcmp(str, ACTION_RESET) == 0)
-    {
-      change->change_kind = svn_fs_path_change_reset;
-    }
   else
     {
       return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -1036,9 +1031,6 @@ write_change_entry(svn_stream_t *stream,
     case svn_fs_path_change_replace:
       change_string = ACTION_REPLACE;
       break;
-    case svn_fs_path_change_reset:
-      change_string = ACTION_RESET;
-      break;
     default:
       return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                _("Invalid change type %d"),

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/transaction.c?rev=1670789&r1=1670788&r2=1670789&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/transaction.c Wed Apr  
1 22:52:26 2015
@@ -932,19 +932,10 @@ fold_change(apr_hash_t *changed_paths,
       /* This path already exists in the hash, so we have to merge
          this change into the already existing one. */
 
-      /* Sanity check:  only allow unused node revision IDs in the
-         `reset' case. */
-      if ((! svn_fs_x__id_used(&change->noderev_id))
-           && (change->change_kind != svn_fs_path_change_reset))
-        return svn_error_create
-          (SVN_ERR_FS_CORRUPT, NULL,
-           _("Missing required node revision ID"));
-
       /* Sanity check: we should be talking about the same node
          revision ID as our last change except where the last change
          was a deletion. */
-      if (svn_fs_x__id_used(&change->noderev_id)
-          && (!svn_fs_x__id_eq(&old_change->noderev_id, &change->noderev_id))
+      if (!svn_fs_x__id_eq(&old_change->noderev_id, &change->noderev_id)
           && (old_change->change_kind != svn_fs_path_change_delete))
         return svn_error_create
           (SVN_ERR_FS_CORRUPT, NULL,
@@ -955,7 +946,6 @@ fold_change(apr_hash_t *changed_paths,
          thing to follow a deletion. */
       if ((old_change->change_kind == svn_fs_path_change_delete)
           && (! ((change->change_kind == svn_fs_path_change_replace)
-                 || (change->change_kind == svn_fs_path_change_reset)
                  || (change->change_kind == svn_fs_path_change_add))))
         return svn_error_create
           (SVN_ERR_FS_CORRUPT, NULL,
@@ -964,8 +954,7 @@ fold_change(apr_hash_t *changed_paths,
       /* Sanity check: an add can't follow anything except
          a delete or reset.  */
       if ((change->change_kind == svn_fs_path_change_add)
-          && (old_change->change_kind != svn_fs_path_change_delete)
-          && (old_change->change_kind != svn_fs_path_change_reset))
+          && (old_change->change_kind != svn_fs_path_change_delete))
         return svn_error_create
           (SVN_ERR_FS_CORRUPT, NULL,
            _("Invalid change ordering: add change on preexisting path"));
@@ -973,12 +962,6 @@ fold_change(apr_hash_t *changed_paths,
       /* Now, merge that change in. */
       switch (change->change_kind)
         {
-        case svn_fs_path_change_reset:
-          /* A reset here will simply remove the path change from the
-             hash. */
-          apr_hash_set(changed_paths, path->data, path->len, NULL);
-          break;
-
         case svn_fs_path_change_delete:
           if (old_change->change_kind == svn_fs_path_change_add)
             {


Reply via email to