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 2014/03/27 21:59:36 UTC
svn commit: r1582471 - in /subversion/trunk/subversion: include/svn_wc.h
libsvn_wc/conflicts.c libsvn_wc/util.c tests/libsvn_wc/conflict-data-test.c
Author: rhuijben
Date: Thu Mar 27 20:59:36 2014
New Revision: 1582471
URL: http://svn.apache.org/r1582471
Log:
Resolve an open question in svn_wc.h by renaming a variable and verifying
all setters.
* subversion/include/svn_wc.h
(svn_wc_conflict_description3_t): Tweak comment to remove the notion
that line endings are always LF (that would only apply to eol-style
native). Answer abspath vs path by renaming the variable.
* subversion/libsvn_wc/conflicts.c
(generate_propconflict): Update user.
(resolve_text_conflict): Update user.
* subversion/libsvn_wc/util.c
(svn_wc__conflict_description3_dup,
svn_wc__cd3_to_cd2): Update user.
* subversion/tests/libsvn_wc/conflict-data-test.c
(compare_conflict): Update user.
Modified:
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_wc/conflicts.c
subversion/trunk/subversion/libsvn_wc/util.c
subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1582471&r1=1582470&r2=1582471&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Thu Mar 27 20:59:36 2014
@@ -1806,18 +1806,16 @@ typedef struct svn_wc_conflict_descripti
* @a base_abspath, @a their_abspath and @a my_abspath are absolute
* paths.
*
- * ### Is @a merged_file relative to some directory, or absolute?
- *
- * All four files will be in repository-normal form -- LF
- * line endings and contracted keywords. (If any of these files are
- * not available, they default to NULL.)
+ * All four files will be in repository-normal form -- Standardized LF
+ * and contracted keywords. (If any of these files are not available
+ * they default to NULL.)
*
* On the other hand, if this is a property-conflict, then these
* paths represent temporary files that contain the three different
* property-values in conflict. The fourth path (@c merged_file)
* may or may not be NULL; if set, it represents libsvn_wc's
- * attempt to merge the property values together. (Remember that
- * property values are technically binary values, and thus can't
+ * attempt to merge the property values together. (Remember that files
+ * and property values are technically binary values, and thus can't
* always be merged.)
*/
const char *base_abspath; /* common ancestor of the two files being merged */
@@ -1829,7 +1827,7 @@ typedef struct svn_wc_conflict_descripti
const char *my_abspath;
/** merged version; may contain conflict markers */
- const char *merged_file;
+ const char *merged_abspath;
/** For property conflicts, the path to the property reject file. */
const char *prop_reject_abspath;
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1582471&r1=1582470&r2=1582471&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Thu Mar 27 20:59:36 2014
@@ -1473,7 +1473,7 @@ generate_propconflict(svn_boolean_t *con
{
svn_stringbuf_t *merged_stringbuf;
- if (!cdesc->merged_file && !result->merged_file)
+ if (!cdesc->merged_abspath && !result->merged_file)
return svn_error_create
(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
NULL, _("Conflict callback violated API:"
@@ -1482,7 +1482,7 @@ generate_propconflict(svn_boolean_t *con
SVN_ERR(svn_stringbuf_from_file2(&merged_stringbuf,
result->merged_file ?
result->merged_file :
- cdesc->merged_file,
+ cdesc->merged_abspath,
scratch_pool));
new_value = svn_stringbuf__morph_into_string(merged_stringbuf);
*conflict_remains = FALSE;
@@ -1809,7 +1809,7 @@ resolve_text_conflict(svn_skel_t **work_
merged-file first: */
result->merged_file
? result->merged_file
- : cdesc->merged_file,
+ : cdesc->merged_abspath,
result_pool, scratch_pool));
}
@@ -1825,7 +1825,7 @@ resolve_text_conflict(svn_skel_t **work_
/* ### Sure this is an abspath? */
result->merged_file
? result->merged_file
- : cdesc->merged_file,
+ : cdesc->merged_abspath,
cdesc->my_abspath,
result_pool, scratch_pool));
*work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
@@ -1873,7 +1873,7 @@ read_text_conflict_desc(svn_wc_conflict_
db, local_abspath,
conflict_skel,
result_pool, scratch_pool));
- (*desc)->merged_file = apr_pstrdup(result_pool, local_abspath);
+ (*desc)->merged_abspath = apr_pstrdup(result_pool, local_abspath);
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1582471&r1=1582470&r2=1582471&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Thu Mar 27 20:59:36 2014
@@ -272,8 +272,8 @@ svn_wc__conflict_description3_dup(const
new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
if (conflict->my_abspath)
new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
- if (conflict->merged_file)
- new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
+ if (conflict->merged_abspath)
+ new_conflict->merged_abspath = apr_pstrdup(pool, conflict->merged_abspath);
if (conflict->src_left_version)
new_conflict->src_left_version =
svn_wc_conflict_version_dup(conflict->src_left_version, pool);
@@ -407,9 +407,9 @@ svn_wc__cd3_to_cd2(const svn_wc_conflict
new_conflict->their_abspath = apr_pstrdup(result_pool,
conflict->their_abspath);
- if (conflict->merged_file)
+ if (conflict->merged_abspath)
new_conflict->merged_file = apr_pstrdup(result_pool,
- conflict->merged_file);
+ conflict->merged_abspath);
}
if (conflict->my_abspath)
new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath);
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=1582471&r1=1582470&r2=1582471&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c Thu Mar 27 20:59:36 2014
@@ -107,7 +107,7 @@ compare_conflict(const svn_wc_conflict_d
ASSERT_STR_EQ(actual->base_abspath, expected->base_abspath);
ASSERT_STR_EQ(actual->their_abspath, expected->their_abspath);
ASSERT_STR_EQ(actual->my_abspath, expected->my_abspath);
- ASSERT_STR_EQ(actual->merged_file, expected->merged_file);
+ ASSERT_STR_EQ(actual->merged_abspath, expected->merged_abspath);
ASSERT_INT_EQ(actual->operation, expected->operation);
SVN_ERR(compare_version(actual->src_left_version,
expected->src_left_version));