Author: stsp
Date: Tue Jul 2 10:40:22 2013
New Revision: 1498873
URL: http://svn.apache.org/r1498873
Log:
Make svn_wc__serialize_conflict() and svn_wc__deserialize_conflict() use the
new conflict description structure (svn_wc_conflict_description3_t).
* subversion/libsvn_wc/entries.c
(read_one_entry): Remove now unneeded conversion to old conflict description.
(write_entry): Pass new conflict description svn_wc__deserialize_conflict().
* subversion/libsvn_wc/tree_conflicts.c
(svn_wc__deserialize_conflict, svn_wc__serialize_conflict): Use new conflict
description. As far as tree conflicts are concerned, both descriptions are
still equivalent so this is not a functional change yet.
* subversion/libsvn_wc/tree_conflicts.h
(svn_wc__deserialize_conflict, svn_wc__serialize_conflict): Update docstrings
and declarations.
* subversion/libsvn_wc/upgrade.c
(read_tree_conflicts, migrate_single_tree_conflict_data,
svn_wc__upgrade_conflict_skel_from_raw): Update callers.
* subversion/tests/libsvn_wc/conflict-data-test.c
(tree_conflict_data, test_deserialize_tree_conflict,
test_serialize_tree_conflict_data): Update callers.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
subversion/trunk/subversion/libsvn_wc/upgrade.c
subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1498873&r1=1498872&r2=1498873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Tue Jul 2 10:40:22 2013
@@ -472,8 +472,7 @@ read_one_entry(const svn_wc_entry_t **ne
{
if (!tree_conflicts)
tree_conflicts = apr_hash_make(scratch_pool);
- svn_hash_sets(tree_conflicts, child_name,
- svn_wc__cd3_to_cd2(conflict, scratch_pool));
+ svn_hash_sets(tree_conflicts, child_name, conflict);
}
}
}
@@ -1893,15 +1892,15 @@ write_entry(struct write_baton **entry_n
scratch_pool);
tree_conflicts = apr_hash_make(result_pool);
skel = skel->children;
- while(skel)
+ while (skel)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
svn_skel_t *new_skel;
const char *key;
/* *CONFLICT is allocated so it is safe to use a non-const pointer */
SVN_ERR(svn_wc__deserialize_conflict(
- (const svn_wc_conflict_description2_t**)&conflict,
+ (const svn_wc_conflict_description3_t**)&conflict,
skel,
svn_dirent_join(root_abspath,
local_relpath,
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.c?rev=1498873&r1=1498872&r2=1498873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.c Tue Jul 2 10:40:22
2013
@@ -196,7 +196,7 @@ read_node_version_info(const svn_wc_conf
svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
const svn_skel_t *skel,
const char *dir_path,
apr_pool_t *result_pool,
@@ -211,7 +211,7 @@ svn_wc__deserialize_conflict(const svn_w
const svn_wc_conflict_version_t *src_left_version;
const svn_wc_conflict_version_t *src_right_version;
int n;
- svn_wc_conflict_description2_t *new_conflict;
+ svn_wc_conflict_description3_t *new_conflict;
if (!is_valid_conflict_skel(skel))
return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
@@ -266,7 +266,7 @@ svn_wc__deserialize_conflict(const svn_w
SVN_ERR(read_node_version_info(&src_right_version, skel->next,
result_pool, scratch_pool));
- new_conflict = svn_wc_conflict_description_create_tree2(victim_abspath,
+ new_conflict = svn_wc_conflict_description_create_tree3(victim_abspath,
node_kind, operation, src_left_version, src_right_version,
result_pool);
new_conflict->action = action;
@@ -329,7 +329,7 @@ prepend_version_info_skel(svn_skel_t *pa
svn_error_t *
svn_wc__serialize_conflict(svn_skel_t **skel,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_wc_conflict_description3_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.h?rev=1498873&r1=1498872&r2=1498873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.h Tue Jul 2 10:40:22
2013
@@ -62,18 +62,18 @@ extern "C" {
svn_error_t *
svn_wc__serialize_conflict(svn_skel_t **skel,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_wc_conflict_description3_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Parse a newly allocated svn_wc_conflict_description2_t object from the
+/* Parse a newly allocated svn_wc_conflict_description3_t object from the
* provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL.
* DIR_PATH is the path to the WC directory whose conflicts are being read.
* Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
const svn_skel_t *skel,
const char *dir_path,
apr_pool_t *result_pool,
Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1498873&r1=1498872&r2=1498873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Tue Jul 2 10:40:22 2013
@@ -654,8 +654,8 @@ ensure_repos_info(svn_wc_entry_t *entry,
/*
* Read tree conflict descriptions from @a conflict_data. Set @a *conflicts
- * to a hash of pointers to svn_wc_conflict_description2_t objects indexed by
- * svn_wc_conflict_description2_t.local_abspath, all newly allocated in @a
+ * to a hash of pointers to svn_wc_conflict_description3_t objects indexed by
+ * svn_wc_conflict_description3_t.local_abspath, all newly allocated in @a
* pool. @a dir_path is the path to the working copy directory whose conflicts
* are being read. The conflicts read are the tree conflicts on the immediate
* child nodes of @a dir_path. Do all allocations in @a pool.
@@ -692,7 +692,7 @@ read_tree_conflicts(apr_hash_t **conflic
iterpool = svn_pool_create(pool);
for (skel = skel->children; skel != NULL; skel = skel->next)
{
- const svn_wc_conflict_description2_t *conflict;
+ const svn_wc_conflict_description3_t *conflict;
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path,
@@ -727,7 +727,7 @@ migrate_single_tree_conflict_data(svn_sq
hi;
hi = apr_hash_next(hi))
{
- const svn_wc_conflict_description2_t *conflict =
+ const svn_wc_conflict_description3_t *conflict =
svn__apr_hash_index_val(hi);
const char *conflict_relpath;
const char *conflict_data;
@@ -1431,7 +1431,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s
if (tree_conflict_data)
{
svn_skel_t *tc_skel;
- const svn_wc_conflict_description2_t *tc;
+ const svn_wc_conflict_description3_t *tc;
const char *local_abspath;
if (!conflict_data)
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=1498873&r1=1498872&r2=1498873&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c Tue Jul 2
10:40:22 2013
@@ -216,7 +216,7 @@ tree_conflict_create(const char *local_a
static svn_error_t *
test_deserialize_tree_conflict(apr_pool_t *pool)
{
- const svn_wc_conflict_description2_t *conflict;
+ const svn_wc_conflict_description3_t *conflict;
svn_wc_conflict_description2_t *exp_conflict;
const char *tree_conflict_data;
const char *local_abspath;
@@ -248,7 +248,7 @@ test_deserialize_tree_conflict(apr_pool_
static svn_error_t *
test_serialize_tree_conflict_data(apr_pool_t *pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
const char *tree_conflict_data;
const char *expected;
const char *local_abspath;
@@ -256,7 +256,7 @@ test_serialize_tree_conflict_data(apr_po
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "Foo.c", pool));
- conflict = svn_wc_conflict_description_create_tree2(
+ conflict = svn_wc_conflict_description_create_tree3(
local_abspath, svn_node_file, svn_wc_operation_update,
NULL, NULL, pool);
conflict->action = svn_wc_conflict_action_delete;