You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gb...@apache.org on 2013/08/21 18:09:52 UTC
svn commit: r1516196 [16/26] - in
/subversion/branches/invoke-diff-cmd-feature: ./ build/ build/ac-macros/
build/generator/ build/generator/swig/ build/generator/templates/
contrib/client-side/emacs/ contrib/hook-scripts/ doc/programmer/ notes/
notes/h...
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_crawler.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_crawler.c Wed Aug 21 16:09:43 2013
@@ -30,6 +30,7 @@
#include <apr_file_io.h>
#include <apr_hash.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
@@ -47,8 +48,6 @@
#include "workqueue.h"
#include "conflicts.h"
-#include "svn_private_config.h"
-
/* Helper for report_revisions_and_depths().
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_files.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_files.c Wed Aug 21 16:09:43 2013
@@ -32,6 +32,7 @@
#include <apr_file_io.h>
#include <apr_strings.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_error.h"
#include "svn_io.h"
@@ -44,7 +45,6 @@
#include "entries.h"
#include "lock.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_ops.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/adm_ops.c Wed Aug 21 16:09:43 2013
@@ -36,6 +36,7 @@
#include <apr_time.h>
#include <apr_errno.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_string.h"
@@ -53,7 +54,6 @@
#include "conflicts.h"
#include "workqueue.h"
-#include "svn_private_config.h"
#include "private/svn_subr_private.h"
#include "private/svn_dep_compat.h"
@@ -148,6 +148,7 @@ process_committed_leaf(svn_wc__db_t *db,
db, local_abspath,
FALSE /* keep_as_working */,
FALSE /* queue_deletes */,
+ TRUE /* remove_locks */,
(! via_recurse)
? new_revnum : SVN_INVALID_REVNUM,
NULL, NULL,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/conflicts.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/conflicts.c Wed Aug 21 16:09:43 2013
@@ -32,6 +32,7 @@
#include <apr_hash.h>
#include <apr_errno.h>
+#include "svn_private_config.h"
#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
@@ -52,8 +53,6 @@
#include "private/svn_skel.h"
#include "private/svn_string_private.h"
-#include "svn_private_config.h"
-
/* --------------------------------------------------------------------
* Conflict skel management
*/
@@ -1277,7 +1276,7 @@ generate_propconflict(svn_boolean_t *con
apr_pool_t *scratch_pool)
{
svn_wc_conflict_result_t *result = NULL;
- svn_wc_conflict_description2_t *cdesc;
+ svn_wc_conflict_description3_t *cdesc;
const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
svn_node_kind_t kind;
const svn_string_t *new_value = NULL;
@@ -1294,7 +1293,7 @@ generate_propconflict(svn_boolean_t *con
svn_dirent_local_style(local_abspath,
scratch_pool));
- cdesc = svn_wc_conflict_description_create_prop2(
+ cdesc = svn_wc_conflict_description_create_prop3(
local_abspath,
(kind == svn_node_dir) ? svn_node_dir : svn_node_file,
propname, scratch_pool);
@@ -1332,7 +1331,6 @@ generate_propconflict(svn_boolean_t *con
base_file stay NULL as-is. Both agents are attempting to add a
new property. */
}
-
else if ((base_val && !incoming_old_val)
|| (!base_val && incoming_old_val))
{
@@ -1354,7 +1352,6 @@ generate_propconflict(svn_boolean_t *con
scratch_pool));
cdesc->base_abspath = svn_dirent_join(dirpath, file_name, scratch_pool);
}
-
else /* base and old are both non-NULL */
{
const svn_string_t *conflict_base_val;
@@ -1398,14 +1395,15 @@ generate_propconflict(svn_boolean_t *con
svn_diff_file_options_t *options =
svn_diff_file_options_create(scratch_pool);
- SVN_ERR(svn_stream_open_unique(&mergestream, &cdesc->merged_file,
+ SVN_ERR(svn_stream_open_unique(&mergestream,
+ &cdesc->prop_reject_abspath,
NULL, svn_io_file_del_on_pool_cleanup,
scratch_pool, scratch_pool));
SVN_ERR(svn_diff_mem_string_diff3(&diff, conflict_base_val,
working_val,
incoming_new_val, options, scratch_pool));
- SVN_ERR(svn_diff_mem_string_output_merge2
- (mergestream, diff, conflict_base_val, working_val,
+ SVN_ERR(svn_diff_mem_string_output_merge2(mergestream, diff,
+ conflict_base_val, working_val,
incoming_new_val, NULL, NULL, NULL, NULL,
svn_diff_conflict_display_modified_latest, scratch_pool));
SVN_ERR(svn_stream_close(mergestream));
@@ -1427,10 +1425,8 @@ generate_propconflict(svn_boolean_t *con
cdesc->reason = svn_wc_conflict_reason_edited;
/* Invoke the interactive conflict callback. */
- {
- SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
- scratch_pool));
- }
+ SVN_ERR(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
+ conflict_baton, scratch_pool, scratch_pool));
if (result == NULL)
{
*conflict_remains = TRUE;
@@ -1781,7 +1777,7 @@ resolve_text_conflict(svn_skel_t **work_
svn_boolean_t *was_resolved,
svn_wc__db_t *db,
const char *local_abspath,
- svn_wc_conflict_description2_t *cdesc,
+ svn_wc_conflict_description3_t *cdesc,
const apr_array_header_t *merge_options,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
@@ -1797,8 +1793,8 @@ resolve_text_conflict(svn_skel_t **work_
/* Give the conflict resolution callback a chance to clean
up the conflicts before we mark the file 'conflicted' */
- SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
- scratch_pool));
+ SVN_ERR(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
+ conflict_baton, scratch_pool, scratch_pool));
if (result == NULL)
return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
_("Conflict callback violated API:"
@@ -1851,7 +1847,7 @@ resolve_text_conflict(svn_skel_t **work_
* Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
* allocations. */
static svn_error_t *
-read_text_conflict_desc(svn_wc_conflict_description2_t **desc,
+read_text_conflict_desc(svn_wc_conflict_description3_t **desc,
svn_wc__db_t *db,
const char *local_abspath,
const svn_skel_t *conflict_skel,
@@ -1863,7 +1859,7 @@ read_text_conflict_desc(svn_wc_conflict_
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- *desc = svn_wc_conflict_description_create_text2(local_abspath, result_pool);
+ *desc = svn_wc_conflict_description_create_text3(local_abspath, result_pool);
(*desc)->is_binary = is_binary;
(*desc)->mime_type = mime_type;
(*desc)->operation = operation;
@@ -1891,7 +1887,7 @@ read_text_conflict_desc(svn_wc_conflict_
* Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
* allocations. */
static svn_error_t *
-read_tree_conflict_desc(svn_wc_conflict_description2_t **desc,
+read_tree_conflict_desc(svn_wc_conflict_description3_t **desc,
svn_wc__db_t *db,
const char *local_abspath,
const svn_skel_t *conflict_skel,
@@ -1916,7 +1912,7 @@ read_tree_conflict_desc(svn_wc_conflict_
else
tc_kind = svn_node_file; /* Avoid assertion */
- *desc = svn_wc_conflict_description_create_tree2(local_abspath, tc_kind,
+ *desc = svn_wc_conflict_description_create_tree3(local_abspath, tc_kind,
operation,
left_version, right_version,
result_pool);
@@ -2042,7 +2038,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
{
svn_skel_t *work_items;
svn_boolean_t was_resolved;
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
apr_hash_t *props;
SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
@@ -2079,7 +2075,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
if (tree_conflicted)
{
svn_wc_conflict_result_t *result;
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
SVN_ERR(read_tree_conflict_desc(&desc,
db, local_abspath, conflict_skel,
@@ -2087,8 +2083,8 @@ svn_wc__conflict_invoke_resolver(svn_wc_
scratch_pool, scratch_pool));
/* Tell the resolver func about this conflict. */
- SVN_ERR(resolver_func(&result, desc, resolver_baton, scratch_pool,
- scratch_pool));
+ SVN_ERR(resolver_func(&result, svn_wc__cd3_to_cd2(desc, scratch_pool),
+ resolver_baton, scratch_pool, scratch_pool));
/* Ignore the result. We cannot apply it here since this code runs
* during an update or merge operation. Tree conflicts are always
@@ -2144,22 +2140,19 @@ read_prop_conflict_descs(apr_array_heade
if ((! create_tempfiles) || apr_hash_count(conflicted_props) == 0)
{
/* Legacy prop conflict with only a .reject file. */
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
- desc = svn_wc_conflict_description_create_prop2(local_abspath,
+ desc = svn_wc_conflict_description_create_prop3(local_abspath,
node_kind,
"", result_pool);
- /* ### This should be changed. The prej file should be stored
- * ### separately from the other files. We need to rev the
- * ### conflict description struct for this. */
- desc->their_abspath = apr_pstrdup(result_pool, prop_reject_file);
+ desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
desc->operation = operation;
desc->src_left_version = left_version;
desc->src_right_version = right_version;
- APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t*) = desc;
+ APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
return SVN_NO_ERROR;
}
@@ -2173,14 +2166,14 @@ read_prop_conflict_descs(apr_array_heade
svn_string_t *old_value;
svn_string_t *my_value;
svn_string_t *their_value;
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
svn_pool_clear(iterpool);
- desc = svn_wc_conflict_description_create_prop2(local_abspath,
- node_kind,
- propname,
- result_pool);
+ desc = svn_wc_conflict_description_create_prop3(local_abspath,
+ node_kind,
+ propname,
+ result_pool);
desc->operation = operation;
desc->src_left_version = left_version;
@@ -2208,10 +2201,7 @@ read_prop_conflict_descs(apr_array_heade
else
desc->reason = svn_wc_conflict_reason_edited;
- /* ### This should be changed. The prej file should be stored
- * ### separately from the other files. We need to rev the
- * ### conflict description struct for this. */
- desc->their_abspath = apr_pstrdup(result_pool, prop_reject_file);
+ desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
/* ### This should be changed. The conflict description for
* ### props should contain these values as svn_string_t,
@@ -2235,10 +2225,7 @@ read_prop_conflict_descs(apr_array_heade
svn_stream_t *s;
apr_size_t len;
- /* ### Currently, their_abspath is used for the prop reject file.
- * ### Put their value into merged instead...
- * ### We need to rev the conflict description struct to fix this. */
- SVN_ERR(svn_stream_open_unique(&s, &desc->merged_file, NULL,
+ SVN_ERR(svn_stream_open_unique(&s, &desc->their_abspath, NULL,
svn_io_file_del_on_pool_cleanup,
result_pool, iterpool));
len = their_value->len;
@@ -2259,7 +2246,7 @@ read_prop_conflict_descs(apr_array_heade
SVN_ERR(svn_stream_close(s));
}
- APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t*) = desc;
+ APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
}
svn_pool_destroy(iterpool);
@@ -2291,7 +2278,7 @@ svn_wc__read_conflicts(const apr_array_h
{
/* Some callers expect not NULL */
*conflicts = apr_array_make(result_pool, 0,
- sizeof(svn_wc_conflict_description2_t*));;
+ sizeof(svn_wc_conflict_description3_t *));;
return SVN_NO_ERROR;
}
@@ -2301,7 +2288,7 @@ svn_wc__read_conflicts(const apr_array_h
result_pool, scratch_pool));
cflcts = apr_array_make(result_pool, 4,
- sizeof(svn_wc_conflict_description2_t*));
+ sizeof(svn_wc_conflict_description3_t *));
if (locations && locations->nelts > 0)
left_version = APR_ARRAY_IDX(locations, 0, const svn_wc_conflict_version_t *);
@@ -2322,26 +2309,26 @@ svn_wc__read_conflicts(const apr_array_h
if (text_conflicted)
{
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
SVN_ERR(read_text_conflict_desc(&desc,
db, local_abspath, conflict_skel,
FALSE /*is_binary*/, NULL /*mime_type*/,
operation, left_version, right_version,
result_pool, scratch_pool));
- APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description2_t*) = desc;
+ APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description3_t *) = desc;
}
if (tree_conflicted)
{
- svn_wc_conflict_description2_t *desc;
+ svn_wc_conflict_description3_t *desc;
SVN_ERR(read_tree_conflict_desc(&desc,
db, local_abspath, conflict_skel,
operation, left_version, right_version,
result_pool, scratch_pool));
- APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description2_t *) = desc;
+ APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description3_t *) = desc;
}
*conflicts = cflcts;
@@ -2929,12 +2916,12 @@ conflict_status_walker(void *baton,
for (i = 0; i < conflicts->nelts; i++)
{
- const svn_wc_conflict_description2_t *cd;
+ const svn_wc_conflict_description3_t *cd;
svn_boolean_t did_resolve;
svn_wc_conflict_choice_t my_choice = cswb->conflict_choice;
const char *merged_file = NULL;
- cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *);
+ cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description3_t *);
svn_pool_clear(iterpool);
@@ -2947,7 +2934,9 @@ conflict_status_walker(void *baton,
_("No conflict-callback and no "
"pre-defined conflict-choice provided"));
- SVN_ERR(cswb->conflict_func(&result, cd, cswb->conflict_baton,
+ SVN_ERR(cswb->conflict_func(&result,
+ svn_wc__cd3_to_cd2(cd, scratch_pool),
+ cswb->conflict_baton,
iterpool, iterpool));
my_choice = result->choice;
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/copy.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/copy.c Wed Aug 21 16:09:43 2013
@@ -28,6 +28,8 @@
/*** Includes. ***/
#include <string.h>
+
+#include "svn_private_config.h"
#include "svn_pools.h"
#include "svn_error.h"
#include "svn_dirent_uri.h"
@@ -39,7 +41,6 @@
#include "props.h"
#include "conflicts.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/crop.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/crop.c Wed Aug 21 16:09:43 2013
@@ -110,6 +110,7 @@ crop_children(svn_wc__db_t *db,
SVN_ERR(svn_wc__db_base_remove(db, child_abspath,
FALSE /* keep_as_working */,
FALSE /* queue_deletes */,
+ FALSE /* remove_locks */,
SVN_INVALID_REVNUM,
NULL, NULL, iterpool));
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/deprecated.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/deprecated.c Wed Aug 21 16:09:43 2013
@@ -28,6 +28,7 @@
#include <apr_md5.h>
+#include "svn_private_config.h"
#include "svn_wc.h"
#include "svn_subst.h"
#include "svn_pools.h"
@@ -47,8 +48,6 @@
#include "translate.h"
#include "workqueue.h"
-#include "svn_private_config.h"
-
/* baton for traversal_info_update */
struct traversal_info_update_baton
{
@@ -2633,6 +2632,148 @@ svn_wc_props_modified_p(svn_boolean_t *m
}
+svn_error_t *
+svn_wc__status2_from_3(svn_wc_status2_t **status,
+ const svn_wc_status3_t *old_status,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ const svn_wc_entry_t *entry = NULL;
+
+ if (old_status == NULL)
+ {
+ *status = NULL;
+ return SVN_NO_ERROR;
+ }
+
+ *status = apr_pcalloc(result_pool, sizeof(**status));
+
+ if (old_status->versioned)
+ {
+ svn_error_t *err;
+ err= svn_wc__get_entry(&entry, wc_ctx->db, local_abspath, FALSE,
+ svn_node_unknown, result_pool, scratch_pool);
+
+ if (err && err->apr_err == SVN_ERR_NODE_UNEXPECTED_KIND)
+ svn_error_clear(err);
+ else
+ SVN_ERR(err);
+ }
+
+ (*status)->entry = entry;
+ (*status)->copied = old_status->copied;
+ (*status)->repos_lock = svn_lock_dup(old_status->repos_lock, result_pool);
+
+ if (old_status->repos_relpath)
+ (*status)->url = svn_path_url_add_component2(old_status->repos_root_url,
+ old_status->repos_relpath,
+ result_pool);
+ (*status)->ood_last_cmt_rev = old_status->ood_changed_rev;
+ (*status)->ood_last_cmt_date = old_status->ood_changed_date;
+ (*status)->ood_kind = old_status->ood_kind;
+ (*status)->ood_last_cmt_author = old_status->ood_changed_author;
+
+ if (old_status->conflicted)
+ {
+ const svn_wc_conflict_description3_t *tree_conflict;
+ const svn_wc_conflict_description2_t *tree_conflict2;
+ SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, wc_ctx, local_abspath,
+ scratch_pool, scratch_pool));
+ tree_conflict2 = svn_wc__cd3_to_cd2(tree_conflict, scratch_pool);
+ (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict2, result_pool);
+ }
+
+ (*status)->switched = old_status->switched;
+
+ (*status)->text_status = old_status->node_status;
+ (*status)->prop_status = old_status->prop_status;
+
+ (*status)->repos_text_status = old_status->repos_node_status;
+ (*status)->repos_prop_status = old_status->repos_prop_status;
+
+ /* Some values might be inherited from properties */
+ if (old_status->node_status == svn_wc_status_modified
+ || old_status->node_status == svn_wc_status_conflicted)
+ (*status)->text_status = old_status->text_status;
+
+ /* (Currently a no-op, but just make sure it is ok) */
+ if (old_status->repos_node_status == svn_wc_status_modified
+ || old_status->repos_node_status == svn_wc_status_conflicted)
+ (*status)->repos_text_status = old_status->repos_text_status;
+
+ if (old_status->node_status == svn_wc_status_added)
+ (*status)->prop_status = svn_wc_status_none; /* No separate info */
+
+ /* Find pristine_text_status value */
+ switch (old_status->text_status)
+ {
+ case svn_wc_status_none:
+ case svn_wc_status_normal:
+ case svn_wc_status_modified:
+ (*status)->pristine_text_status = old_status->text_status;
+ break;
+ case svn_wc_status_conflicted:
+ default:
+ /* ### Fetch compare data, or fall back to the documented
+ not retrieved behavior? */
+ (*status)->pristine_text_status = svn_wc_status_none;
+ break;
+ }
+
+ /* Find pristine_prop_status value */
+ switch (old_status->prop_status)
+ {
+ case svn_wc_status_none:
+ case svn_wc_status_normal:
+ case svn_wc_status_modified:
+ if (old_status->node_status != svn_wc_status_added
+ && old_status->node_status != svn_wc_status_deleted
+ && old_status->node_status != svn_wc_status_replaced)
+ {
+ (*status)->pristine_prop_status = old_status->prop_status;
+ }
+ else
+ (*status)->pristine_prop_status = svn_wc_status_none;
+ break;
+ case svn_wc_status_conflicted:
+ default:
+ /* ### Fetch compare data, or fall back to the documented
+ not retrieved behavior? */
+ (*status)->pristine_prop_status = svn_wc_status_none;
+ break;
+ }
+
+ if (old_status->versioned
+ && old_status->conflicted
+ && old_status->node_status != svn_wc_status_obstructed
+ && (old_status->kind == svn_node_file
+ || old_status->node_status != svn_wc_status_missing))
+ {
+ svn_boolean_t text_conflict_p, prop_conflict_p;
+
+ /* The entry says there was a conflict, but the user might have
+ marked it as resolved by deleting the artifact files, so check
+ for that. */
+ SVN_ERR(svn_wc__internal_conflicted_p(&text_conflict_p,
+ &prop_conflict_p,
+ NULL,
+ wc_ctx->db, local_abspath,
+ scratch_pool));
+
+ if (text_conflict_p)
+ (*status)->text_status = svn_wc_status_conflicted;
+
+ if (prop_conflict_p)
+ (*status)->prop_status = svn_wc_status_conflicted;
+ }
+
+ return SVN_NO_ERROR;
+}
+
+
+
/*** From status.c ***/
struct status4_wrapper_baton
@@ -4580,3 +4721,98 @@ svn_wc_read_kind(svn_node_kind_t *kind,
return SVN_NO_ERROR;
}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_text2(const char *local_abspath,
+ apr_pool_t *result_pool)
+{
+ svn_wc_conflict_description2_t *conflict;
+
+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+ conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+ conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+ conflict->node_kind = svn_node_file;
+ conflict->kind = svn_wc_conflict_kind_text;
+ conflict->action = svn_wc_conflict_action_edit;
+ conflict->reason = svn_wc_conflict_reason_edited;
+ return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_prop2(const char *local_abspath,
+ svn_node_kind_t node_kind,
+ const char *property_name,
+ apr_pool_t *result_pool)
+{
+ svn_wc_conflict_description2_t *conflict;
+
+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+ conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+ conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+ conflict->node_kind = node_kind;
+ conflict->kind = svn_wc_conflict_kind_property;
+ conflict->property_name = apr_pstrdup(result_pool, property_name);
+ return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_tree2(
+ const char *local_abspath,
+ svn_node_kind_t node_kind,
+ svn_wc_operation_t operation,
+ const svn_wc_conflict_version_t *src_left_version,
+ const svn_wc_conflict_version_t *src_right_version,
+ apr_pool_t *result_pool)
+{
+ svn_wc_conflict_description2_t *conflict;
+
+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
+ conflict = apr_pcalloc(result_pool, sizeof(*conflict));
+ conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
+ conflict->node_kind = node_kind;
+ conflict->kind = svn_wc_conflict_kind_tree;
+ conflict->operation = operation;
+ conflict->src_left_version = svn_wc_conflict_version_dup(src_left_version,
+ result_pool);
+ conflict->src_right_version = svn_wc_conflict_version_dup(src_right_version,
+ result_pool);
+ return conflict;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+ apr_pool_t *pool)
+{
+ svn_wc_conflict_description2_t *new_conflict;
+
+ new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
+
+ /* Shallow copy all members. */
+ *new_conflict = *conflict;
+
+ if (conflict->local_abspath)
+ new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
+ if (conflict->property_name)
+ new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
+ if (conflict->mime_type)
+ new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
+ if (conflict->base_abspath)
+ new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
+ if (conflict->their_abspath)
+ 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->src_left_version)
+ new_conflict->src_left_version =
+ svn_wc_conflict_version_dup(conflict->src_left_version, pool);
+ if (conflict->src_right_version)
+ new_conflict->src_right_version =
+ svn_wc_conflict_version_dup(conflict->src_right_version, pool);
+
+ return new_conflict;
+}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_editor.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_editor.c Wed Aug 21 16:09:43 2013
@@ -57,6 +57,7 @@
#include <assert.h>
+#include "svn_private_config.h"
#include "svn_error.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
@@ -75,8 +76,6 @@
#include "translate.h"
#include "diff.h"
-#include "svn_private_config.h"
-
/*-------------------------------------------------------------------------*/
@@ -474,14 +473,18 @@ svn_wc__diff_base_working_diff(svn_wc__d
{
const svn_io_dirent2_t *dirent;
+ /* Verify truename to mimic status for iota/IOTA difference on Windows */
SVN_ERR(svn_io_stat_dirent2(&dirent, local_abspath,
- FALSE /* verify truename */,
+ TRUE /* verify truename */,
TRUE /* ingore_enoent */,
scratch_pool, scratch_pool));
- if (dirent->kind == svn_node_file
- && dirent->filesize == recorded_size
- && dirent->mtime == recorded_time)
+ /* If a file does not exist on disk (missing/obstructed) then we
+ can't provide a text diff */
+ if (dirent->kind != svn_node_file
+ || (dirent->kind == svn_node_file
+ && dirent->filesize == recorded_size
+ && dirent->mtime == recorded_time))
{
files_same = TRUE;
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_local.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/diff_local.c Wed Aug 21 16:09:43 2013
@@ -31,6 +31,7 @@
#include <apr_hash.h>
+#include "svn_private_config.h"
#include "svn_error.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
@@ -45,8 +46,6 @@
#include "translate.h"
#include "diff.h"
-#include "svn_private_config.h"
-
/*-------------------------------------------------------------------------*/
/* Baton containing the state of a directory
@@ -195,23 +194,15 @@ diff_status_callback(void *baton,
struct diff_baton *eb = baton;
svn_wc__db_t *db = eb->db;
- switch (status->node_status)
- {
- case svn_wc_status_unversioned:
- case svn_wc_status_ignored:
- return SVN_NO_ERROR; /* No diff */
-
- case svn_wc_status_conflicted:
- if (status->text_status == svn_wc_status_none
- && status->prop_status == svn_wc_status_none)
- {
- /* Node is an actual only node describing a tree conflict */
- return SVN_NO_ERROR;
- }
- break;
+ if (! status->versioned)
+ return SVN_NO_ERROR; /* unversioned (includes dir externals) */
- default:
- break; /* Go check other conditions */
+ if (status->node_status == svn_wc_status_conflicted
+ && status->text_status == svn_wc_status_none
+ && status->prop_status == svn_wc_status_none)
+ {
+ /* Node is an actual only node describing a tree conflict */
+ return SVN_NO_ERROR;
}
/* Not text/prop modified, not copied. Easy out */
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/entries.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/entries.c Wed Aug 21 16:09:43 2013
@@ -26,6 +26,7 @@
#include <apr_strings.h>
+#include "svn_private_config.h"
#include "svn_error.h"
#include "svn_types.h"
#include "svn_time.h"
@@ -45,7 +46,6 @@
#include "wc_db.h"
#include "wc-queries.h" /* for STMT_* */
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
#include "private/svn_sqlite.h"
@@ -464,9 +464,9 @@ read_one_entry(const svn_wc_entry_t **ne
for (j = 0; j < child_conflicts->nelts; j++)
{
- const svn_wc_conflict_description2_t *conflict =
+ const svn_wc_conflict_description3_t *conflict =
APR_ARRAY_IDX(child_conflicts, j,
- svn_wc_conflict_description2_t *);
+ svn_wc_conflict_description3_t *);
if (conflict->kind == svn_wc_conflict_kind_tree)
{
@@ -1892,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/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/externals.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/externals.c Wed Aug 21 16:09:43 2013
@@ -32,6 +32,7 @@
#include <apr_general.h>
#include <apr_uri.h>
+#include "svn_private_config.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_error.h"
@@ -53,8 +54,6 @@
#include "translate.h"
#include "workqueue.h"
#include "conflicts.h"
-
-#include "svn_private_config.h"
/** Externals **/
@@ -1413,6 +1412,7 @@ svn_wc__external_remove(svn_wc_context_t
SVN_ERR(svn_wc__db_base_remove(wc_ctx->db, local_abspath,
FALSE /* keep_as_working */,
TRUE /* queue_deletes */,
+ FALSE /* remove_locks */,
SVN_INVALID_REVNUM,
NULL, NULL, scratch_pool));
SVN_ERR(svn_wc__wq_run(wc_ctx->db, local_abspath,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/info.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/info.c Wed Aug 21 16:09:43 2013
@@ -21,6 +21,7 @@
* @endcopyright
*/
+#include "svn_private_config.h"
#include "svn_dirent_uri.h"
#include "svn_hash.h"
#include "svn_path.h"
@@ -29,7 +30,6 @@
#include "wc.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
@@ -310,10 +310,16 @@ build_info_for_node(svn_wc__info2_t **in
local_abspath, result_pool, scratch_pool));
if (conflicted)
- SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, db,
- local_abspath,
- TRUE /* ### create tempfiles */,
- result_pool, scratch_pool));
+ {
+ const apr_array_header_t *conflicts;
+
+ SVN_ERR(svn_wc__read_conflicts(&conflicts, db,
+ local_abspath,
+ TRUE /* ### create tempfiles */,
+ result_pool, scratch_pool));
+ wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
+ result_pool);
+ }
else
wc_info->conflicts = NULL;
@@ -373,7 +379,7 @@ struct found_entry_baton
svn_boolean_t actual_only;
svn_boolean_t first;
/* The set of tree conflicts that have been found but not (yet) visited by
- * the tree walker. Map of abspath -> svn_wc_conflict_description2_t. */
+ * the tree walker. Map of abspath -> empty string. */
apr_hash_t *tree_conflicts;
apr_pool_t *pool;
};
@@ -534,8 +540,9 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
hi = apr_hash_next(hi))
{
const char *this_abspath = svn__apr_hash_index_key(hi);
- const svn_wc_conflict_description2_t *tree_conflict;
+ const svn_wc_conflict_description3_t *tree_conflict;
svn_wc__info2_t *info;
+ const apr_array_header_t *conflicts;
svn_pool_clear(iterpool);
@@ -548,7 +555,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
&repos_uuid,
wc_ctx->db,
svn_dirent_dirname(
- local_abspath,
+ this_abspath,
iterpool),
scratch_pool,
iterpool));
@@ -557,21 +564,22 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
info->repos_root_URL = repos_root_url;
info->repos_UUID = repos_uuid;
- SVN_ERR(svn_wc__read_conflicts(&info->wc_info->conflicts,
+ SVN_ERR(svn_wc__read_conflicts(&conflicts,
wc_ctx->db, this_abspath,
TRUE /* ### create tempfiles */,
iterpool, iterpool));
-
- if (! info->wc_info->conflicts || ! info->wc_info->conflicts->nelts)
+ if (! conflicts || ! conflicts->nelts)
continue;
- tree_conflict = APR_ARRAY_IDX(info->wc_info->conflicts, 0,
- svn_wc_conflict_description2_t *);
+ tree_conflict = APR_ARRAY_IDX(conflicts, 0,
+ const svn_wc_conflict_description3_t *);
if (!depth_includes(local_abspath, depth, tree_conflict->local_abspath,
tree_conflict->node_kind, iterpool))
continue;
+ info->wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
+ iterpool);
SVN_ERR(receiver(receiver_baton, this_abspath, info, iterpool));
}
svn_pool_destroy(iterpool);
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/lock.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/lock.c Wed Aug 21 16:09:43 2013
@@ -26,6 +26,7 @@
#include <apr_pools.h>
#include <apr_time.h>
+#include "svn_private_config.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -39,7 +40,6 @@
#include "props.h"
#include "wc_db.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/node.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/node.c Wed Aug 21 16:09:43 2013
@@ -38,6 +38,7 @@
#include <apr_pools.h>
#include <apr_time.h>
+#include "svn_private_config.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -49,7 +50,6 @@
#include "entries.h"
#include "wc_db.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/old-and-busted.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/old-and-busted.c Wed Aug 21 16:09:43 2013
@@ -23,6 +23,7 @@
+#include "svn_private_config.h"
#include "svn_time.h"
#include "svn_xml.h"
#include "svn_dirent_uri.h"
@@ -37,7 +38,6 @@
#include "lock.h"
#include "private/svn_wc_private.h"
-#include "svn_private_config.h"
/* Within the (old) entries file, boolean values have a specific string
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/props.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/props.c Wed Aug 21 16:09:43 2013
@@ -33,6 +33,7 @@
#include <apr_strings.h>
#include <apr_general.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_pools.h"
@@ -60,8 +61,6 @@
#include "workqueue.h"
#include "conflicts.h"
-#include "svn_private_config.h"
-
/* Forward declaration. */
static svn_error_t *
prop_conflict_from_skel(const svn_string_t **conflict_desc,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/revert.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/revert.c Wed Aug 21 16:09:43 2013
@@ -29,6 +29,7 @@
#include <apr_pools.h>
#include <apr_tables.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_string.h"
@@ -43,7 +44,6 @@
#include "adm_files.h"
#include "workqueue.h"
-#include "svn_private_config.h"
#include "private/svn_io_private.h"
#include "private/svn_wc_private.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/status.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/status.c Wed Aug 21 16:09:43 2013
@@ -30,6 +30,7 @@
#include <apr_file_io.h>
#include <apr_hash.h>
+#include "svn_private_config.h"
#include "svn_pools.h"
#include "svn_types.h"
#include "svn_delta.h"
@@ -43,8 +44,6 @@
#include "svn_hash.h"
#include "svn_sorts.h"
-#include "svn_private_config.h"
-
#include "wc.h"
#include "props.h"
#include "entries.h"
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/translate.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/translate.c Wed Aug 21 16:09:43 2013
@@ -30,6 +30,7 @@
#include <apr_file_io.h>
#include <apr_strings.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_dirent_uri.h"
@@ -45,11 +46,9 @@
#include "translate.h"
#include "props.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
-
/* */
static svn_error_t *
read_handler_unsupported(void *baton, char *buffer, apr_size_t *len)
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.c Wed Aug 21 16:09:43 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)
{
@@ -401,7 +401,7 @@ svn_wc__del_tree_conflict(svn_wc_context
svn_error_t *
svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_wc_conflict_description3_t *conflict,
apr_pool_t *scratch_pool)
{
svn_boolean_t existing_conflict;
@@ -443,7 +443,7 @@ svn_wc__add_tree_conflict(svn_wc_context
NULL,
scratch_pool, scratch_pool));
- switch(conflict->operation)
+ switch (conflict->operation)
{
case svn_wc_operation_update:
default:
@@ -473,7 +473,7 @@ svn_wc__add_tree_conflict(svn_wc_context
svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -495,17 +495,18 @@ svn_wc__get_tree_conflict(const svn_wc_c
for (i = 0; i < conflicts->nelts; i++)
{
- const svn_wc_conflict_description2_t *desc;
+ const svn_wc_conflict_description3_t *desc;
- desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
+ desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
if (desc->kind == svn_wc_conflict_kind_tree)
{
- *tree_conflict = svn_wc__conflict_description2_dup(desc,
- result_pool);
+ *tree_conflict = svn_wc__conflict_description3_dup(desc, result_pool);
return SVN_NO_ERROR;
}
}
+
+ *tree_conflict = NULL;
return SVN_NO_ERROR;
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.h?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/tree_conflicts.h Wed Aug 21 16:09:43 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/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/update_editor.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/update_editor.c Wed Aug 21 16:09:43 2013
@@ -32,6 +32,7 @@
#include <apr_tables.h>
#include <apr_strings.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_hash.h"
@@ -40,7 +41,6 @@
#include "svn_path.h"
#include "svn_error.h"
#include "svn_io.h"
-#include "svn_private_config.h"
#include "svn_time.h"
#include "wc.h"
@@ -1011,9 +1011,13 @@ window_handler(svn_txdelta_window_t *win
if (err)
{
- /* We failed to apply the delta; clean up the temporary file. */
- svn_error_clear(svn_io_remove_file2(hb->new_text_base_tmp_abspath, TRUE,
- hb->pool));
+ /* We failed to apply the delta; clean up the temporary file if it
+ already created by lazy_open_target(). */
+ if (hb->new_text_base_tmp_abspath)
+ {
+ svn_error_clear(svn_io_remove_file2(hb->new_text_base_tmp_abspath,
+ TRUE, hb->pool));
+ }
}
else
{
@@ -1706,7 +1710,7 @@ delete_entry(const char *path,
const char *base = svn_relpath_basename(path, NULL);
const char *local_abspath;
const char *repos_relpath;
- svn_node_kind_t kind, base_kind;
+ svn_node_kind_t kind;
svn_revnum_t old_revision;
svn_boolean_t conflicted;
svn_boolean_t have_work;
@@ -1735,6 +1739,7 @@ delete_entry(const char *path,
{
svn_boolean_t is_root;
+
SVN_ERR(svn_wc__db_is_wcroot(&is_root, eb->db, local_abspath,
scratch_pool));
@@ -1762,10 +1767,9 @@ delete_entry(const char *path,
if (!have_work)
{
base_status = status;
- base_kind = kind;
}
else
- SVN_ERR(svn_wc__db_base_get_info(&base_status, &base_kind, &old_revision,
+ SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, &old_revision,
&repos_relpath,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
@@ -1813,6 +1817,7 @@ delete_entry(const char *path,
SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath,
FALSE /* keep_as_working */,
FALSE /* queue_deletes */,
+ FALSE /* remove_locks */,
SVN_INVALID_REVNUM /* not_present_rev */,
NULL, NULL,
scratch_pool));
@@ -1836,9 +1841,7 @@ delete_entry(const char *path,
{
SVN_ERR(check_tree_conflict(&tree_conflict, eb, local_abspath,
status, TRUE,
- (kind == svn_node_dir)
- ? svn_node_dir
- : svn_node_file,
+ kind,
svn_wc_conflict_action_delete,
pb->pool, scratch_pool));
}
@@ -1911,7 +1914,7 @@ delete_entry(const char *path,
{
/* Delete, and do not leave a not-present node. */
SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath,
- keep_as_working, queue_deletes,
+ keep_as_working, queue_deletes, FALSE,
SVN_INVALID_REVNUM /* not_present_rev */,
tree_conflict, NULL,
scratch_pool));
@@ -1920,7 +1923,7 @@ delete_entry(const char *path,
{
/* Delete, leaving a not-present node. */
SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath,
- keep_as_working, queue_deletes,
+ keep_as_working, queue_deletes, FALSE,
*eb->target_revision,
tree_conflict, NULL,
scratch_pool));
@@ -1939,8 +1942,19 @@ delete_entry(const char *path,
/* Notify. */
if (tree_conflict)
- do_notification(eb, local_abspath, svn_node_unknown,
- svn_wc_notify_tree_conflict, scratch_pool);
+ {
+ if (eb->conflict_func)
+ SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath,
+ tree_conflict,
+ NULL /* merge_options */,
+ eb->conflict_func,
+ eb->conflict_baton,
+ eb->cancel_func,
+ eb->cancel_baton,
+ scratch_pool));
+ do_notification(eb, local_abspath, svn_node_unknown,
+ svn_wc_notify_tree_conflict, scratch_pool);
+ }
else
{
svn_wc_notify_action_t action = svn_wc_notify_update_delete;
@@ -2289,6 +2303,16 @@ add_directory(const char *path,
if (tree_conflict != NULL)
{
+ if (eb->conflict_func)
+ SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, db->local_abspath,
+ tree_conflict,
+ NULL /* merge_options */,
+ eb->conflict_func,
+ eb->conflict_baton,
+ eb->cancel_func,
+ eb->cancel_baton,
+ pool));
+
db->already_notified = TRUE;
do_notification(eb, db->local_abspath, svn_node_dir,
svn_wc_notify_tree_conflict, pool);
@@ -2907,7 +2931,7 @@ close_directory(void *dir_baton,
eb->conflict_func,
eb->conflict_baton,
eb->cancel_func,
- eb->conflict_baton,
+ eb->cancel_baton,
scratch_pool));
/* Notify of any prop changes on this directory -- but do nothing if
@@ -3380,6 +3404,16 @@ add_file(const char *path,
tree_conflict, NULL,
scratch_pool));
+ if (eb->conflict_func)
+ SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, fb->local_abspath,
+ tree_conflict,
+ NULL /* merge_options */,
+ eb->conflict_func,
+ eb->conflict_baton,
+ eb->cancel_func,
+ eb->cancel_baton,
+ scratch_pool));
+
fb->already_notified = TRUE;
do_notification(eb, fb->local_abspath, svn_node_file,
svn_wc_notify_tree_conflict, scratch_pool);
@@ -4703,6 +4737,7 @@ close_edit(void *edit_baton,
SVN_ERR(svn_wc__db_base_remove(eb->db, eb->target_abspath,
FALSE /* keep_as_working */,
FALSE /* queue_deletes */,
+ FALSE /* remove_locks */,
SVN_INVALID_REVNUM,
NULL, NULL, scratch_pool));
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/upgrade.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/upgrade.c Wed Aug 21 16:09:43 2013
@@ -23,6 +23,7 @@
#include <apr_pools.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_dirent_uri.h"
@@ -38,7 +39,6 @@
#include "wc-queries.h" /* for STMT_* */
#include "workqueue.h"
-#include "svn_private_config.h"
#include "private/svn_wc_private.h"
#include "private/svn_sqlite.h"
#include "private/svn_token.h"
@@ -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)
@@ -2196,13 +2196,15 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
upgrade_working_copy_baton_t cb_baton;
svn_error_t *err;
int result_format;
+ svn_boolean_t bumped_format;
/* Try upgrading a wc-ng-style working copy. */
SVN_ERR(svn_wc__db_open(&db, NULL /* ### config */, TRUE, FALSE,
scratch_pool, scratch_pool));
- err = svn_wc__db_bump_format(&result_format, local_abspath, db,
+ err = svn_wc__db_bump_format(&result_format, &bumped_format,
+ db, local_abspath,
scratch_pool);
if (err)
{
@@ -2224,6 +2226,17 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
SVN_ERR_ASSERT(result_format == SVN_WC__VERSION);
+ if (bumped_format && notify_func)
+ {
+ svn_wc_notify_t *notify;
+
+ notify = svn_wc_create_notify(local_abspath,
+ svn_wc_notify_upgraded_path,
+ scratch_pool);
+
+ notify_func(notify_baton, notify, scratch_pool);
+ }
+
return SVN_NO_ERROR;
}
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/util.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/util.c Wed Aug 21 16:09:43 2013
@@ -188,11 +188,11 @@ svn_wc_match_ignore_list(const char *str
return svn_cstring_match_glob_list(str, list);
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_text2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_text3(const char *local_abspath,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -205,13 +205,13 @@ svn_wc_conflict_description_create_text2
return conflict;
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_prop2(const char *local_abspath,
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_prop3(const char *local_abspath,
svn_node_kind_t node_kind,
const char *property_name,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -223,8 +223,8 @@ svn_wc_conflict_description_create_prop2
return conflict;
}
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_tree2(
+svn_wc_conflict_description3_t *
+svn_wc_conflict_description_create_tree3(
const char *local_abspath,
svn_node_kind_t node_kind,
svn_wc_operation_t operation,
@@ -232,7 +232,7 @@ svn_wc_conflict_description_create_tree2
const svn_wc_conflict_version_t *src_right_version,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
@@ -249,11 +249,11 @@ svn_wc_conflict_description_create_tree2
}
-svn_wc_conflict_description2_t *
-svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
+svn_wc_conflict_description3_t *
+svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t *conflict,
apr_pool_t *pool)
{
- svn_wc_conflict_description2_t *new_conflict;
+ svn_wc_conflict_description3_t *new_conflict;
new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
@@ -339,6 +339,90 @@ svn_wc_conflict_version_dup(const svn_wc
return new_version;
}
+apr_array_header_t *
+svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
+ apr_pool_t *result_pool)
+{
+ apr_array_header_t *new_conflicts;
+ int i;
+
+ new_conflicts = apr_array_make(result_pool, conflicts->nelts,
+ sizeof (svn_wc_conflict_description2_t *));
+
+ for (i = 0; i < conflicts->nelts; i++)
+ {
+ svn_wc_conflict_description3_t *cd;
+ svn_wc_conflict_description2_t *cd2;
+
+ cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
+ cd2 = svn_wc__cd3_to_cd2(cd, result_pool);
+ APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *) = cd2;
+ }
+
+ return new_conflicts;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
+ apr_pool_t *result_pool)
+{
+ svn_wc_conflict_description2_t *new_conflict;
+
+ if (conflict == NULL)
+ return NULL;
+
+ new_conflict = apr_pcalloc(result_pool, sizeof(*new_conflict));
+
+ if (conflict->local_abspath)
+ new_conflict->local_abspath = apr_pstrdup(result_pool,
+ conflict->local_abspath);
+ new_conflict->node_kind = conflict->node_kind;
+ new_conflict->kind = conflict->kind;
+ if (conflict->property_name)
+ new_conflict->property_name = apr_pstrdup(result_pool,
+ conflict->property_name);
+ new_conflict->is_binary = conflict->is_binary;
+ if (conflict->mime_type)
+ new_conflict->mime_type = apr_pstrdup(result_pool, conflict->mime_type);
+ new_conflict->action = conflict->action;
+ new_conflict->reason = conflict->reason;
+ if (conflict->base_abspath)
+ new_conflict->base_abspath = apr_pstrdup(result_pool,
+ conflict->base_abspath);
+
+ if (conflict->kind == svn_wc_conflict_kind_property)
+ {
+ /* For property conflicts, cd2 stored prop_reject_abspath in
+ * their_abspath, and stored theirs_abspath in merged_file. */
+ if (conflict->prop_reject_abspath)
+ new_conflict->their_abspath = apr_pstrdup(result_pool,
+ conflict->prop_reject_abspath);
+ if (conflict->their_abspath)
+ new_conflict->merged_file = apr_pstrdup(result_pool,
+ conflict->their_abspath);
+ }
+ else
+ {
+ if (conflict->their_abspath)
+ new_conflict->their_abspath = apr_pstrdup(result_pool,
+ conflict->their_abspath);
+
+ if (conflict->merged_file)
+ new_conflict->merged_file = apr_pstrdup(result_pool,
+ conflict->merged_file);
+ }
+ if (conflict->my_abspath)
+ new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath);
+ new_conflict->operation = conflict->operation;
+ if (conflict->src_left_version)
+ new_conflict->src_left_version =
+ svn_wc_conflict_version_dup(conflict->src_left_version, result_pool);
+ if (conflict->src_right_version)
+ new_conflict->src_right_version =
+ svn_wc_conflict_version_dup(conflict->src_right_version, result_pool);
+
+ return new_conflict;
+}
svn_wc_conflict_description_t *
svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict,
@@ -403,145 +487,6 @@ svn_wc__cd2_to_cd(const svn_wc_conflict_
svn_error_t *
-svn_wc__status2_from_3(svn_wc_status2_t **status,
- const svn_wc_status3_t *old_status,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const svn_wc_entry_t *entry = NULL;
-
- if (old_status == NULL)
- {
- *status = NULL;
- return SVN_NO_ERROR;
- }
-
- *status = apr_pcalloc(result_pool, sizeof(**status));
-
- if (old_status->versioned)
- {
- svn_error_t *err;
- err= svn_wc__get_entry(&entry, wc_ctx->db, local_abspath, FALSE,
- svn_node_unknown, result_pool, scratch_pool);
-
- if (err && err->apr_err == SVN_ERR_NODE_UNEXPECTED_KIND)
- svn_error_clear(err);
- else
- SVN_ERR(err);
- }
-
- (*status)->entry = entry;
- (*status)->copied = old_status->copied;
- (*status)->repos_lock = svn_lock_dup(old_status->repos_lock, result_pool);
-
- if (old_status->repos_relpath)
- (*status)->url = svn_path_url_add_component2(old_status->repos_root_url,
- old_status->repos_relpath,
- result_pool);
- (*status)->ood_last_cmt_rev = old_status->ood_changed_rev;
- (*status)->ood_last_cmt_date = old_status->ood_changed_date;
- (*status)->ood_kind = old_status->ood_kind;
- (*status)->ood_last_cmt_author = old_status->ood_changed_author;
-
- if (old_status->conflicted)
- {
- const svn_wc_conflict_description2_t *tree_conflict;
- SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, wc_ctx, local_abspath,
- scratch_pool, scratch_pool));
- (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict, result_pool);
- }
-
- (*status)->switched = old_status->switched;
-
- (*status)->text_status = old_status->node_status;
- (*status)->prop_status = old_status->prop_status;
-
- (*status)->repos_text_status = old_status->repos_node_status;
- (*status)->repos_prop_status = old_status->repos_prop_status;
-
- /* Some values might be inherited from properties */
- if (old_status->node_status == svn_wc_status_modified
- || old_status->node_status == svn_wc_status_conflicted)
- (*status)->text_status = old_status->text_status;
-
- /* (Currently a no-op, but just make sure it is ok) */
- if (old_status->repos_node_status == svn_wc_status_modified
- || old_status->repos_node_status == svn_wc_status_conflicted)
- (*status)->repos_text_status = old_status->repos_text_status;
-
- if (old_status->node_status == svn_wc_status_added)
- (*status)->prop_status = svn_wc_status_none; /* No separate info */
-
- /* Find pristine_text_status value */
- switch (old_status->text_status)
- {
- case svn_wc_status_none:
- case svn_wc_status_normal:
- case svn_wc_status_modified:
- (*status)->pristine_text_status = old_status->text_status;
- break;
- case svn_wc_status_conflicted:
- default:
- /* ### Fetch compare data, or fall back to the documented
- not retrieved behavior? */
- (*status)->pristine_text_status = svn_wc_status_none;
- break;
- }
-
- /* Find pristine_prop_status value */
- switch (old_status->prop_status)
- {
- case svn_wc_status_none:
- case svn_wc_status_normal:
- case svn_wc_status_modified:
- if (old_status->node_status != svn_wc_status_added
- && old_status->node_status != svn_wc_status_deleted
- && old_status->node_status != svn_wc_status_replaced)
- {
- (*status)->pristine_prop_status = old_status->prop_status;
- }
- else
- (*status)->pristine_prop_status = svn_wc_status_none;
- break;
- case svn_wc_status_conflicted:
- default:
- /* ### Fetch compare data, or fall back to the documented
- not retrieved behavior? */
- (*status)->pristine_prop_status = svn_wc_status_none;
- break;
- }
-
- if (old_status->versioned
- && old_status->conflicted
- && old_status->node_status != svn_wc_status_obstructed
- && (old_status->kind == svn_node_file
- || old_status->node_status != svn_wc_status_missing))
- {
- svn_boolean_t text_conflict_p, prop_conflict_p;
-
- /* The entry says there was a conflict, but the user might have
- marked it as resolved by deleting the artifact files, so check
- for that. */
- SVN_ERR(svn_wc__internal_conflicted_p(&text_conflict_p,
- &prop_conflict_p,
- NULL,
- wc_ctx->db, local_abspath,
- scratch_pool));
-
- if (text_conflict_p)
- (*status)->text_status = svn_wc_status_conflicted;
-
- if (prop_conflict_p)
- (*status)->prop_status = svn_wc_status_conflicted;
- }
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
svn_wc__fetch_kind_func(svn_node_kind_t *kind,
void *baton,
const char *path,
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc-queries.sql Wed Aug 21 16:09:43 2013
@@ -472,6 +472,10 @@ WHERE wc_id = ?1
DELETE FROM lock
WHERE repos_id = ?1 AND repos_relpath = ?2
+-- STMT_DELETE_LOCK_RECURSIVELY
+DELETE FROM lock
+WHERE repos_id = ?1 AND (repos_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(repos_relpath, ?2))
+
-- STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE
UPDATE nodes SET dav_cache = NULL
WHERE dav_cache IS NOT NULL AND wc_id = ?1 AND op_depth = 0
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc.h?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc.h Wed Aug 21 16:09:43 2013
@@ -157,6 +157,8 @@ extern "C" {
* The bump to 31 added the inherited_props column in the NODES table.
* Bumped in r1395109.
*
+ * == 1.8.x shipped with format 31
+ *
* Please document any further format changes here.
*/
@@ -681,7 +683,7 @@ svn_wc__write_check(svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool);
-/* Read into CONFLICTS svn_wc_conflict_description2_t* structs
+/* Read into CONFLICTS svn_wc_conflict_description3_t* structs
* for all conflicts that have LOCAL_ABSPATH as victim.
*
* Victim must be versioned or be part of a tree conflict.
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.c Wed Aug 21 16:09:43 2013
@@ -27,6 +27,7 @@
#include <apr_pools.h>
#include <apr_hash.h>
+#include "svn_private_config.h"
#include "svn_types.h"
#include "svn_error.h"
#include "svn_dirent_uri.h"
@@ -48,7 +49,6 @@
#include "workqueue.h"
#include "token-map.h"
-#include "svn_private_config.h"
#include "private/svn_sqlite.h"
#include "private/svn_skel.h"
#include "private/svn_wc_private.h"
@@ -1529,7 +1529,6 @@ svn_wc__db_init(svn_wc__db_t *db,
apr_pstrdup(db->state_pool, local_abspath),
sdb, wc_id, FORMAT_FROM_SDB,
FALSE /* auto-upgrade */,
- FALSE /* enforce_empty_wq */,
db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
@@ -2086,6 +2085,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
svn_wc__db_t *db, /* For checking conflicts */
svn_boolean_t keep_as_working,
svn_boolean_t queue_deletes,
+ svn_boolean_t remove_locks,
svn_revnum_t not_present_revision,
svn_skel_t *conflict,
svn_skel_t *work_items,
@@ -2106,6 +2106,16 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
wcroot, local_relpath,
scratch_pool, scratch_pool));
+ if (remove_locks)
+ {
+ svn_sqlite__stmt_t *lock_stmt;
+
+ SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb,
+ STMT_DELETE_LOCK_RECURSIVELY));
+ SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath));
+ SVN_ERR(svn_sqlite__step_done(lock_stmt));
+ }
+
if (status == svn_wc__db_status_normal
&& keep_as_working)
{
@@ -2333,6 +2343,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t keep_as_working,
svn_boolean_t queue_deletes,
+ svn_boolean_t remove_locks,
svn_revnum_t not_present_revision,
svn_skel_t *conflict,
svn_skel_t *work_items,
@@ -2349,7 +2360,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
SVN_WC__DB_WITH_TXN(db_base_remove(wcroot, local_relpath,
db, keep_as_working, queue_deletes,
- not_present_revision,
+ remove_locks, not_present_revision,
conflict, work_items, scratch_pool),
wcroot);
@@ -10814,7 +10825,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot,
svn_sqlite__stmt_t *lock_stmt;
SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb,
- STMT_DELETE_LOCK));
+ STMT_DELETE_LOCK_RECURSIVELY));
SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath));
SVN_ERR(svn_sqlite__step_done(lock_stmt));
}
@@ -11058,7 +11069,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
revision != new_rev)))
{
return svn_error_trace(db_base_remove(wcroot, local_relpath,
- db, FALSE, FALSE,
+ db, FALSE, FALSE, FALSE,
SVN_INVALID_REVNUM,
NULL, NULL, scratch_pool));
}
@@ -12288,7 +12299,6 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_
dir_abspath),
*sdb, *wc_id, FORMAT_FROM_SDB,
FALSE /* auto-upgrade */,
- FALSE /* enforce_empty_wq */,
wc_db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
@@ -13493,6 +13503,7 @@ wclock_obtain_cb(svn_wc__db_wcroot_t *wc
const char *local_relpath,
int levels_to_lock,
svn_boolean_t steal_lock,
+ svn_boolean_t enforce_empty_wq,
apr_pool_t *scratch_pool)
{
svn_sqlite__stmt_t *stmt;
@@ -13522,6 +13533,9 @@ wclock_obtain_cb(svn_wc__db_wcroot_t *wc
scratch_pool));
}
+ if (enforce_empty_wq)
+ SVN_ERR(svn_wc__db_verify_no_work(wcroot->sdb));
+
/* Check if there are nodes locked below the new lock root */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_FIND_WC_LOCK));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
@@ -13696,7 +13710,7 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
SVN_WC__DB_WITH_TXN(
wclock_obtain_cb(wcroot, local_relpath, levels_to_lock, steal_lock,
- scratch_pool),
+ db->enforce_empty_wq, scratch_pool),
wcroot);
return SVN_NO_ERROR;
}
@@ -14978,14 +14992,18 @@ svn_wc__db_verify(svn_wc__db_t *db,
svn_error_t *
svn_wc__db_bump_format(int *result_format,
- const char *wcroot_abspath,
+ svn_boolean_t *bumped_format,
svn_wc__db_t *db,
+ const char *wcroot_abspath,
apr_pool_t *scratch_pool)
{
svn_sqlite__db_t *sdb;
svn_error_t *err;
int format;
+ if (bumped_format)
+ *bumped_format = FALSE;
+
/* Do not scan upwards for a working copy root here to prevent accidental
* upgrades of any working copies the WCROOT might be nested in.
* Just try to open a DB at the specified path instead. */
@@ -15020,7 +15038,10 @@ svn_wc__db_bump_format(int *result_forma
SVN_ERR(svn_sqlite__read_schema_version(&format, sdb, scratch_pool));
err = svn_wc__upgrade_sdb(result_format, wcroot_abspath,
- sdb, format, scratch_pool);
+ sdb, format, scratch_pool);
+
+ if (err == SVN_NO_ERROR && bumped_format)
+ *bumped_format = (*result_format > format);
/* Make sure we return a different error than expected for upgrades from
entries */
Modified: subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h?rev=1516196&r1=1516195&r2=1516196&view=diff
==============================================================================
--- subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/invoke-diff-cmd-feature/subversion/libsvn_wc/wc_db.h Wed Aug 21 16:09:43 2013
@@ -702,6 +702,9 @@ svn_wc__db_base_add_not_present_node(svn
(With KEEP_AS_WORKING TRUE, this is a no-op, as everything is
automatically shadowed by the created copy)
+ If REMOVE_LOCKS is TRUE, all locks of this node and any subnodes
+ are also removed. This is to be done during commit of deleted nodes.
+
If NOT_PRESENT_REVISION specifies a valid revision a not-present
node is installed in BASE node with kind NOT_PRESENT_KIND after
deleting.
@@ -715,6 +718,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t keep_as_working,
svn_boolean_t queue_deletes,
+ svn_boolean_t remove_locks,
svn_revnum_t not_present_revision,
svn_skel_t *conflict,
svn_skel_t *work_items,
@@ -2120,7 +2124,7 @@ svn_wc__db_read_pristine_props(apr_hash_
* paths relative to the repository root URL for cached inherited
* properties and absolute working copy paths otherwise.
*
- * If ACTUAL_PROPS is not NULL, then set *ACTUAL_PROPS to the actual
+ * If ACTUAL_PROPS is not NULL, then set *ACTUAL_PROPS to ALL the actual
* properties stored on LOCAL_ABSPATH.
*
* Allocate @a *iprops in @a result_pool. Use @a scratch_pool
@@ -2909,11 +2913,15 @@ svn_wc__db_upgrade_get_repos_id(apr_int6
* Upgrading subdirectories of a working copy is not supported.
* If WCROOT_ABSPATH is not a working copy root SVN_ERR_WC_INVALID_OP_ON_CWD
* is returned.
+ *
+ * If BUMPED_FORMAT is not NULL, set *BUMPED_FORMAT to TRUE if the format
+ * was bumped or to FALSE if the wc was already at the resulting format.
*/
svn_error_t *
svn_wc__db_bump_format(int *result_format,
- const char *wcroot_abspath,
+ svn_boolean_t *bumped_format,
svn_wc__db_t *db,
+ const char *wcroot_abspath,
apr_pool_t *scratch_pool);
/* @} */