You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/11/06 10:41:59 UTC
svn commit: r1712927 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Author: stefan2
Date: Fri Nov 6 09:41:59 2015
New Revision: 1712927
URL: http://svn.apache.org/viewvc?rev=1712927&view=rev
Log:
The svn_fs_contents_different implementation is broken in 1.9.x under the
circumstances described in issue #4554. Trunk works because there we
correct expanded-size values when reading them from disk.
This patch removes the special case code that triggers the problem in 1.9.x
so we can backport it directly as a fix. On trunk, it results in a minor
simplification with virtually zero impact on performance.
The problem is FSFS-specific, meaning BDB and FSX don't need to be fixed.
Found by: kotkov
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__file_text_rep_equal): Remove the rather pointless length==0
special case. They are rare and will
compare just fine like any other contents.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1712927&r1=1712926&r2=1712927&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Nov 6 09:41:59 2015
@@ -1416,8 +1416,8 @@ svn_fs_fs__file_text_rep_equal(svn_boole
svn_stream_t *contents_a, *contents_b;
representation_t *rep_a = a->data_rep;
representation_t *rep_b = b->data_rep;
- svn_boolean_t a_empty = !rep_a || rep_a->expanded_size == 0;
- svn_boolean_t b_empty = !rep_b || rep_b->expanded_size == 0;
+ svn_boolean_t a_empty = !rep_a;
+ svn_boolean_t b_empty = !rep_b;
/* This makes sure that neither rep will be NULL later on */
if (a_empty && b_empty)