subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1554978 - in /subversion/trunk/subversion: libsvn_fs_fs/cached_data.c libsvn_fs_x/cached_data.c
Date Fri, 03 Jan 2014 00:17:02 GMT
Author: stefan2
Date: Fri Jan  3 00:17:01 2014
New Revision: 1554978

URL: http://svn.apache.org/r1554978
Log:
Fix the svn_fs_get_file_delta_stream for FSFS and FSX.  We may only
use the on-disk delta representation, if that is actually a delta
between source and target node.  A self-delta will not do.

* subversion/libsvn_fs_fs/cached_data.c
  (svn_fs_fs__get_file_delta_stream): Don't accept self-delta reps
                                      as a short-cut.

* subversion/libsvn_fs_x/cached_data.c
  (svn_fs_x__get_file_delta_stream): Ditto.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
    subversion/trunk/subversion/libsvn_fs_x/cached_data.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1554978&r1=1554977&r2=1554978&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Fri Jan  3 00:17:01 2014
@@ -1844,11 +1844,13 @@ svn_fs_fs__get_file_delta_stream(svn_txd
       /* Read target's base rep if any. */
       SVN_ERR(create_rep_state(&rep_state, &rep_header, NULL,
                                target->data_rep, fs, pool));
-      /* If that matches source, then use this delta as is. */
-      if (rep_header->type == svn_fs_fs__rep_self_delta
-          || (rep_header->type == svn_fs_fs__rep_delta
-              && rep_header->base_revision == source->data_rep->revision
-              && rep_header->base_item_index == source->data_rep->item_index))
+
+      /* If that matches source, then use this delta as is.
+         Note that we want an actual delta here.  E.g. a self-delta would
+         not be good enogh. */
+      if (rep_header->type == svn_fs_fs__rep_delta
+          && rep_header->base_revision == source->data_rep->revision
+          && rep_header->base_item_index == source->data_rep->item_index)
         {
           /* Create the delta read baton. */
           struct delta_read_baton *drb = apr_pcalloc(pool, sizeof(*drb));

Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1554978&r1=1554977&r2=1554978&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Fri Jan  3 00:17:01 2014
@@ -1968,11 +1968,13 @@ svn_fs_x__get_file_delta_stream(svn_txde
       /* Read target's base rep if any. */
       SVN_ERR(create_rep_state(&rep_state, &rep_header, NULL,
                                target->data_rep, fs, pool));
-      /* If that matches source, then use this delta as is. */
-      if (rep_header->type == svn_fs_x__rep_self_delta
-          || (rep_header->type == svn_fs_x__rep_delta
-              && rep_header->base_revision == source->data_rep->revision
-              && rep_header->base_item_index == source->data_rep->item_index))
+
+      /* If that matches source, then use this delta as is.
+         Note that we want an actual delta here.  E.g. a self-delta would
+         not be good enogh. */
+      if (rep_header->type == svn_fs_x__rep_delta
+          && rep_header->base_revision == source->data_rep->revision
+          && rep_header->base_item_index == source->data_rep->item_index)
         {
           /* Create the delta read baton. */
           struct delta_read_baton *drb = apr_pcalloc(pool, sizeof(*drb));



Mime
View raw message