You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/07/04 20:22:56 UTC
svn commit: r1357362 - in /subversion/trunk/subversion:
libsvn_wc/conflicts.c tests/libsvn_wc/conflict-data-test.c
Author: rhuijben
Date: Wed Jul 4 18:22:55 2012
New Revision: 1357362
URL: http://svn.apache.org/viewvc?rev=1357362&view=rev
Log:
Fix a skel check in svn_wc__conflict_read_markers() that segfaulted when
used from the experimental conflict skel mode.
* subversion/libsvn_wc/conflicts.c
(svn_wc__conflict_read_markers): Fix finding markers.
* subversion/tests/libsvn_wc/conflict-data-test.c
(test_serialize_text_conflict): Read the markers.
Modified:
subversion/trunk/subversion/libsvn_wc/conflicts.c
subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1357362&r1=1357361&r2=1357362&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Wed Jul 4 18:22:55 2012
@@ -968,16 +968,19 @@ svn_wc__conflict_read_markers(const apr_
SVN_ERR_ASSERT(conflict_skel != NULL);
+ /* Walk the conflicts */
for (conflict = conflict_skel->children->next->children;
conflict;
conflict = conflict->next)
{
const svn_skel_t *marker;
- for (marker = conflict->next->children;
+ /* Get the list of markers stored per conflict */
+ for (marker = conflict->children->next->children;
marker;
marker = marker->next)
{
+ /* Skip placeholders */
if (! marker->is_atom)
continue;
Modified: subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1357362&r1=1357361&r2=1357362&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c Wed Jul 4 18:22:55 2012
@@ -450,6 +450,17 @@ test_serialize_text_conflict(const svn_t
SVN_TEST_ASSERT(APR_ARRAY_IDX(locs, 1, svn_wc_conflict_version_t*) != NULL);
}
+ {
+ const apr_array_header_t *markers;
+
+ SVN_ERR(svn_wc__conflict_read_markers(&markers,
+ sbox.wc_ctx->db, sbox.wc_abspath,
+ conflict_skel, pool, pool));
+
+ SVN_TEST_ASSERT(markers != NULL);
+ SVN_TEST_ASSERT(markers->nelts == 3);
+ }
+
return SVN_NO_ERROR;
}