diff options
Diffstat (limited to 'subversion/libsvn_fs_fs/dag.c')
-rw-r--r-- | subversion/libsvn_fs_fs/dag.c | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/subversion/libsvn_fs_fs/dag.c b/subversion/libsvn_fs_fs/dag.c index 78d1b23e3583a..d21c17c4b9aa5 100644 --- a/subversion/libsvn_fs_fs/dag.c +++ b/subversion/libsvn_fs_fs/dag.c @@ -1307,34 +1307,58 @@ svn_fs_fs__dag_things_different(svn_boolean_t *props_changed, apr_pool_t *pool) { node_revision_t *noderev1, *noderev2; - svn_fs_t *fs; - svn_boolean_t same; /* If we have no place to store our results, don't bother doing anything. */ if (! props_changed && ! contents_changed) return SVN_NO_ERROR; - fs = svn_fs_fs__dag_get_fs(node1); - /* The node revision skels for these two nodes. */ SVN_ERR(get_node_revision(&noderev1, node1)); SVN_ERR(get_node_revision(&noderev2, node2)); - /* Compare property keys. */ - if (props_changed != NULL) + if (strict) { - SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, noderev1, noderev2, - strict, pool)); - *props_changed = !same; - } + /* In strict mode, compare text and property representations in the + svn_fs_contents_different() / svn_fs_props_different() manner. - /* Compare contents keys. */ - if (contents_changed != NULL) + See the "No-op changes no longer dumped by 'svnadmin dump' in 1.9" + discussion (http://svn.haxx.se/dev/archive-2015-09/0269.shtml) and + issue #4598 (https://issues.apache.org/jira/browse/SVN-4598). */ + svn_fs_t *fs = svn_fs_fs__dag_get_fs(node1); + svn_boolean_t same; + + /* Compare property keys. */ + if (props_changed != NULL) + { + SVN_ERR(svn_fs_fs__prop_rep_equal(&same, fs, noderev1, + noderev2, pool)); + *props_changed = !same; + } + + /* Compare contents keys. */ + if (contents_changed != NULL) + { + SVN_ERR(svn_fs_fs__file_text_rep_equal(&same, fs, noderev1, + noderev2, pool)); + *contents_changed = !same; + } + } + else { - SVN_ERR(svn_fs_fs__file_text_rep_equal(&same, fs, noderev1, noderev2, - strict, pool)); - *contents_changed = !same; + /* Otherwise, compare representation keys -- as in Subversion 1.8. */ + + /* Compare property keys. */ + if (props_changed != NULL) + *props_changed = + !svn_fs_fs__noderev_same_rep_key(noderev1->prop_rep, + noderev2->prop_rep); + + /* Compare contents keys. */ + if (contents_changed != NULL) + *contents_changed = + !svn_fs_fs__noderev_same_rep_key(noderev1->data_rep, + noderev2->data_rep); } return SVN_NO_ERROR; |