You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/01 01:23:14 UTC
svn commit: r929745 - in /subversion/trunk/subversion/libsvn_wc: log.c log.h
props.h tree_conflicts.h update_editor.c
Author: gstein
Date: Wed Mar 31 23:23:13 2010
New Revision: 929745
URL: http://svn.apache.org/viewvc?rev=929745&view=rev
Log:
Remove the update editor's directory baton's log_accum field. It was only
being used to queue up tree conflicts for children. There is no need to
hold those until close_directory(), so the children place them into the
directory's work queue directly.
Relatedly, svn_wc__loggy_add_tree_conflict() now queues the work item
directly, rather than returning it in a LOG_ACCUM parameter. The updated
signature is moved from tree_conflicts.h(!!!) to log.h.
Unrelatedly, some member name changes were made to the editor's batons for
clarity of purpose.
* subversion/libsvn_wc/log.h:
(svn_wc__loggy_add_tree_conflict): moved here from tree_conflicts.h and
updated to take a DB/ADM_ABSPATH pair instead of a LOG_ACCUM.
(svn_wc__loggy_revert_props_create): moved here from props.h
* subversion/libsvn_wc/tree_conflicts.h:
(svn_wc__loggy_add_tree_conflict): moved to log.h
* subversion/libsvn_wc/props.h:
(svn_wc__loggy_revert_props_create): moved to log.h
* subversion/libsvn_wc/log.c:
(svn_wc__loggy_add_tree_conflict): updated signature and queueing of the
resulting work item.
* subversion/libsvn_wc/update_editor.c:
(struct dir_baton): ADDED member removed (never used). EXISTED is
renamed to OBSTRUCTION_FOUND. LOG_ACCUM removed.
(flush_log): removed. no longer needed.
(cleanup_dir_baton): just run the work queue; no flush needed
(make_dir_baton): remove ADDED param (now obsolete). rename assignment
to OBSTRUCTION_FOUND and remove init of LOG_ACCUM.
(struct file_baton): rename ADDED to ADDING_FILE. rename EXISTED to
OBSTRUCTION_FOUND.
(make_file_baton, apply_textdelta, merge_file, close_file): track
renames in the file_baton.
(open_root): no need to pass an ADDED flag to make_dir_baton
(do_entry_deletion): update the logging of a tree conflict
(delete_entry): remove call to flush_log()
(add_directory): no need to pass an ADDED flag to make_dir_baton. remove
flush_log call. track renames in dir_baton. adjust params to
loggy_add_tree_conflict.
(open_directory): no need to pass an ADDED flag to make_dir_baton.
remove a flush_log call. adjust params to loggy_add_tree_conflict
(close_directory): remove assertion on LOG_ACCUM. remove a call to
flush_log. track renames in dir_baton.
(add_file): track renames in file_baton. adjust the queuing of a
conflict work item.
(open_file): adjust the queuing of a conflict work item.
Modified:
subversion/trunk/subversion/libsvn_wc/log.c
subversion/trunk/subversion/libsvn_wc/log.h
subversion/trunk/subversion/libsvn_wc/props.h
subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.c?rev=929745&r1=929744&r2=929745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.c (original)
+++ subversion/trunk/subversion/libsvn_wc/log.c Wed Mar 31 23:23:13 2010
@@ -1195,19 +1195,22 @@ svn_wc__loggy_set_timestamp(svn_stringbu
svn_error_t *
-svn_wc__loggy_add_tree_conflict(svn_stringbuf_t **log_accum,
+svn_wc__loggy_add_tree_conflict(svn_wc__db_t *db,
+ const char *adm_abspath,
const svn_wc_conflict_description2_t *conflict,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
+ svn_stringbuf_t *log_accum = NULL;
const char *victim_basename;
svn_skel_t *skel;
const char *conflict_data;
- victim_basename = svn_dirent_basename(conflict->local_abspath, pool);
- SVN_ERR(svn_wc__serialize_conflict(&skel, conflict, pool, pool));
- conflict_data = svn_skel__unparse(skel, pool)->data,
+ victim_basename = svn_dirent_basename(conflict->local_abspath, scratch_pool);
+ SVN_ERR(svn_wc__serialize_conflict(&skel, conflict,
+ scratch_pool, scratch_pool));
+ conflict_data = svn_skel__unparse(skel, scratch_pool)->data,
- svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+ svn_xml_make_open_tag(&log_accum, scratch_pool, svn_xml_self_closing,
SVN_WC__LOG_ADD_TREE_CONFLICT,
SVN_WC__LOG_ATTR_NAME,
victim_basename,
@@ -1215,7 +1218,8 @@ svn_wc__loggy_add_tree_conflict(svn_stri
conflict_data,
NULL);
- return SVN_NO_ERROR;
+ return svn_error_return(svn_wc__wq_add_loggy(db, adm_abspath, log_accum,
+ scratch_pool));
}
Modified: subversion/trunk/subversion/libsvn_wc/log.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.h?rev=929745&r1=929744&r2=929745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.h (original)
+++ subversion/trunk/subversion/libsvn_wc/log.h Wed Mar 31 23:23:13 2010
@@ -289,6 +289,34 @@ svn_wc__loggy_set_timestamp(svn_stringbu
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* Like svn_wc__add_tree_conflict(), but append to the log accumulator
+ * LOG_ACCUM a command to rewrite the entry field, and do not flush the log.
+ * This function is meant to be used in the working copy library where
+ * log accumulators are usually readily available.
+ *
+ * If *LOG_ACCUM is NULL then set *LOG_ACCUM to a new stringbug allocated in
+ * POOL, else append to the existing stringbuf there.
+ */
+svn_error_t *
+svn_wc__loggy_add_tree_conflict(svn_wc__db_t *db,
+ const char *adm_abspath,
+ const svn_wc_conflict_description2_t *conflict,
+ apr_pool_t *scratch_pool);
+
+
+/* Extend LOG_ACCUM with log entries to save the current baseprops of PATH
+ as revert props.
+
+ Makes sure the baseprops are destroyed if DESTROY_BASEPROPS is TRUE,
+ the baseprops are preserved otherwise.
+*/
+svn_error_t *
+svn_wc__loggy_revert_props_create(svn_stringbuf_t **log_accum,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *adm_abspath,
+ apr_pool_t *pool);
+
/* TODO ###
Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=929745&r1=929744&r2=929745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Wed Mar 31 23:23:13 2010
@@ -164,18 +164,6 @@ svn_wc__install_props(svn_wc__db_t *db,
svn_boolean_t force_base_install,
apr_pool_t *scratch_pool);
-/* Extend LOG_ACCUM with log entries to save the current baseprops of PATH
- as revert props.
-
- Makes sure the baseprops are destroyed if DESTROY_BASEPROPS is TRUE,
- the baseprops are preserved otherwise.
-*/
-svn_error_t *
-svn_wc__loggy_revert_props_create(svn_stringbuf_t **log_accum,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *adm_abspath,
- apr_pool_t *pool);
/* Delete PROPS_KIND props for LOCAL_ABSPATH */
svn_error_t *
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.h?rev=929745&r1=929744&r2=929745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.h Wed Mar 31 23:23:13 2010
@@ -74,19 +74,6 @@ svn_wc__deserialize_conflict(const svn_w
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Like svn_wc__add_tree_conflict(), but append to the log accumulator
- * LOG_ACCUM a command to rewrite the entry field, and do not flush the log.
- * This function is meant to be used in the working copy library where
- * log accumulators are usually readily available.
- *
- * If *LOG_ACCUM is NULL then set *LOG_ACCUM to a new stringbug allocated in
- * POOL, else append to the existing stringbuf there.
- */
-svn_error_t *
-svn_wc__loggy_add_tree_conflict(svn_stringbuf_t **log_accum,
- const svn_wc_conflict_description2_t *conflict,
- apr_pool_t *pool);
-
/*
* Encode tree conflict descriptions into a single string.
*
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=929745&r1=929744&r2=929745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Mar 31 23:23:13 2010
@@ -305,13 +305,9 @@ struct dir_baton
These nodes should all be marked as deleted. */
svn_boolean_t in_deleted_and_tree_conflicted_subtree;
- /* Set iff this is a new directory that is not yet versioned and not
- yet in the parent's list of entries */
- svn_boolean_t added;
-
/* Set if an unversioned dir of the same name already existed in
this directory. */
- svn_boolean_t existed;
+ svn_boolean_t obstruction_found;
/* Set if a dir of the same name already exists and is
scheduled for addition without history. */
@@ -324,13 +320,6 @@ struct dir_baton
/* The bump information for this directory. */
struct bump_dir_info *bump_info;
- /* The current log buffer. The content of this accumulator may be
- flushed and run at any time (in pool cleanup), so only append
- complete sets of operations to it; you may need to build up a
- buffer of operations and append it atomically with
- svn_stringbuf_appendstr. */
- svn_stringbuf_t *log_accum;
-
/* The depth of the directory in the wc (or inferred if added). Not
used for filtering; we have a separate wrapping editor for that. */
svn_depth_t ambient_depth;
@@ -504,17 +493,6 @@ node_get_relpath_ignore_errors(svn_wc__d
return relpath;
}
-/* Flush accumulated log entries to a log file on disk for DIR_BATON and
- * increase the log number of the dir baton.
- * Use POOL for temporary allocations. */
-static svn_error_t *
-flush_log(struct dir_baton *db, apr_pool_t *pool)
-{
- SVN_WC__FLUSH_LOG_ACCUM(db->edit_baton->db, db->local_abspath,
- db->log_accum, pool);
-
- return SVN_NO_ERROR;
-}
/* An APR pool cleanup handler. This runs the log file for a
directory baton. */
@@ -526,11 +504,9 @@ cleanup_dir_baton(void *dir_baton)
svn_error_t *err;
apr_pool_t *pool = apr_pool_parent_get(db->pool);
- err = flush_log(db, pool);
- if (!err)
- err = svn_wc__wq_run(eb->db, db->local_abspath,
- eb->cancel_func, eb->cancel_baton,
- pool);
+ err = svn_wc__wq_run(eb->db, db->local_abspath,
+ eb->cancel_func, eb->cancel_baton,
+ pool);
/* If the editor aborts for some sort of error, the command line
client relies on pool cleanup to run outstanding work queues and
@@ -573,7 +549,6 @@ make_dir_baton(struct dir_baton **d_p,
const char *path,
struct edit_baton *eb,
struct dir_baton *pb,
- svn_boolean_t added,
apr_pool_t *scratch_pool)
{
apr_pool_t *dir_pool;
@@ -660,11 +635,9 @@ make_dir_baton(struct dir_baton **d_p,
d->parent_baton = pb;
d->pool = dir_pool;
d->propchanges = apr_array_make(dir_pool, 1, sizeof(svn_prop_t));
- d->added = added;
- d->existed = FALSE;
+ d->obstruction_found = FALSE;
d->add_existed = FALSE;
d->bump_info = bdi;
- d->log_accum = svn_stringbuf_create("", dir_pool);
d->old_revision = SVN_INVALID_REVNUM;
/* The caller of this function needs to fill these in. */
@@ -947,14 +920,14 @@ struct file_baton
svn_boolean_t already_notified;
/* Set if this file is new. */
- svn_boolean_t added;
+ svn_boolean_t adding_file;
/* Set if this file is new with history. */
svn_boolean_t added_with_history;
/* Set if an unversioned file of the same name already existed in
this directory. */
- svn_boolean_t existed;
+ svn_boolean_t obstruction_found;
/* Set if a file of the same name already exists and is
scheduled for addition without history. */
@@ -1059,8 +1032,8 @@ make_file_baton(struct file_baton **f_p,
f->edit_baton = pb->edit_baton;
f->propchanges = apr_array_make(file_pool, 1, sizeof(svn_prop_t));
f->bump_info = pb->bump_info;
- f->added = adding;
- f->existed = FALSE;
+ f->adding_file = adding;
+ f->obstruction_found = FALSE;
f->add_existed = FALSE;
f->deleted = FALSE;
f->dir_baton = pb;
@@ -1344,7 +1317,7 @@ open_root(void *edit_baton,
edit run. */
eb->root_opened = TRUE;
- SVN_ERR(make_dir_baton(&db, NULL, eb, NULL, FALSE, pool));
+ SVN_ERR(make_dir_baton(&db, NULL, eb, NULL, pool));
*dir_baton = db;
SVN_ERR(svn_wc__db_read_kind(&kind, eb->db, db->local_abspath, TRUE, pool));
@@ -2040,6 +2013,7 @@ node_already_conflicted(svn_boolean_t *c
return SVN_NO_ERROR;
}
+
/* Delete PATH from its immediate parent PARENT_PATH, in the edit
* represented by EB. PATH is relative to EB->anchor.
* PARENT_PATH is relative to the current working directory.
@@ -2110,13 +2084,8 @@ do_entry_deletion(struct edit_baton *eb,
/* When we raise a tree conflict on a directory, we want to avoid
* making any changes inside it. (Will an update ever try to make
* further changes to or inside a directory it's just deleted?) */
- {
- svn_stringbuf_t *log_accum = NULL;
-
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&log_accum, tree_conflict,
- pool));
- SVN_ERR(svn_wc__wq_add_loggy(eb->db, dir_abspath, log_accum, pool));
- }
+ SVN_ERR(svn_wc__loggy_add_tree_conflict(eb->db, dir_abspath,
+ tree_conflict, pool));
SVN_ERR(remember_skipped_tree(eb, local_abspath));
@@ -2287,9 +2256,6 @@ delete_entry(const char *path,
their_relpath = svn_relpath_join(pb->new_relpath, base, pool);
- /* Flush parent log before potentially adding tree conflicts */
- SVN_ERR(flush_log(pb, pool));
-
return do_entry_deletion(pb->edit_baton, local_abspath,
their_relpath,
pb->in_deleted_and_tree_conflicted_subtree,
@@ -2321,7 +2287,7 @@ add_directory(const char *path,
|| (!copyfrom_path &&
!SVN_IS_VALID_REVNUM(copyfrom_revision)));
- SVN_ERR(make_dir_baton(&db, path, eb, pb, TRUE, pool));
+ SVN_ERR(make_dir_baton(&db, path, eb, pb, pool));
*child_baton = db;
if (pb->skip_descendants)
@@ -2357,9 +2323,6 @@ add_directory(const char *path,
db->ambient_depth = svn_depth_infinity;
}
- /* Flush the log for the parent directory before going into this subtree. */
- SVN_ERR(flush_log(pb, pool));
-
/* Is this path a conflict victim? */
SVN_ERR(node_already_conflicted(&already_conflicted, eb->db,
db->local_abspath, pool));
@@ -2424,7 +2387,7 @@ add_directory(const char *path,
(wc_kind == svn_wc__db_kind_unknown || !IS_NODE_PRESENT(status)))
{
/* Found an unversioned directory */
- db->existed = TRUE;
+ db->obstruction_found = TRUE;
if (!eb->allow_unver_obstructions)
{
@@ -2542,9 +2505,10 @@ add_directory(const char *path,
if (tree_conflict != NULL)
{
- /* Record this conflict so that its descendants are
- skipped silently. */
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&pb->log_accum,
+ /* Queue this conflict in the parent so that its descendants
+ are skipped silently. */
+ SVN_ERR(svn_wc__loggy_add_tree_conflict(eb->db,
+ pb->local_abspath,
tree_conflict,
pool));
@@ -2680,7 +2644,7 @@ add_directory(const char *path,
if (db->in_deleted_and_tree_conflicted_subtree)
action = svn_wc_notify_update_add_deleted;
- else if (db->existed)
+ else if (db->obstruction_found)
action = svn_wc_notify_exists;
else
action = svn_wc_notify_update_add;
@@ -2708,7 +2672,7 @@ open_directory(const char *path,
svn_wc_conflict_description2_t *tree_conflict = NULL;
svn_wc__db_status_t status, base_status;
- SVN_ERR(make_dir_baton(&db, path, eb, pb, FALSE, pool));
+ SVN_ERR(make_dir_baton(&db, path, eb, pb, pool));
*child_baton = db;
/* We should have a write lock on every directory touched. */
@@ -2730,9 +2694,6 @@ open_directory(const char *path,
SVN_ERR(check_path_under_root(pb->local_abspath, db->name, pool));
- /* Flush the log for the parent directory before going into this subtree. */
- SVN_ERR(flush_log(pb, pool));
-
SVN_ERR(svn_wc__db_read_info(&status, NULL, &db->old_revision, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
&db->ambient_depth, NULL, NULL, NULL, NULL,
@@ -2781,8 +2742,9 @@ open_directory(const char *path,
/* Remember the roots of any locally deleted trees. */
if (tree_conflict != NULL)
{
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&pb->log_accum, tree_conflict,
- pool));
+ /* Place a tree conflict into the parent work queue. */
+ SVN_ERR(svn_wc__loggy_add_tree_conflict(eb->db, pb->local_abspath,
+ tree_conflict, pool));
do_notification(eb, db->local_abspath, svn_node_dir,
svn_wc_notify_tree_conflict, pool);
@@ -2914,9 +2876,8 @@ close_directory(void *dir_baton,
{
db->bump_info->skipped = TRUE;
- /* The log accumulator better be empty because we aren't going to
- be running any logs in this directory. */
- SVN_ERR_ASSERT(svn_stringbuf_isempty(db->log_accum));
+ /* ### hopefully this directory's queue is empty, cuz we're not
+ ### going to be running it! */
/* Allow the parent to complete its update. */
SVN_ERR(maybe_bump_dir_info(eb, db->bump_info, db->pool));
@@ -3051,9 +3012,6 @@ close_directory(void *dir_baton,
new_base_props, new_actual_props,
TRUE /* write_base_props */, TRUE, pool));
- /* Flush the log. */
- SVN_ERR(flush_log(db, pool));
-
if (last_change)
SVN_ERR(svn_wc__db_temp_op_set_base_last_change(eb->db, db->local_abspath,
last_change->cmt_rev,
@@ -3083,7 +3041,7 @@ close_directory(void *dir_baton,
if (db->in_deleted_and_tree_conflicted_subtree)
action = svn_wc_notify_update_update_deleted;
- else if (db->existed || db->add_existed)
+ else if (db->obstruction_found || db->add_existed)
action = svn_wc_notify_exists;
else
action = svn_wc_notify_update_update;
@@ -3703,7 +3661,7 @@ add_file(const char *path,
if (kind == svn_node_file &&
(wc_kind == svn_wc__db_kind_unknown || !IS_NODE_PRESENT(status)))
{
- fb->existed = TRUE;
+ fb->obstruction_found = TRUE;
if (!eb->allow_unver_obstructions)
{
@@ -3821,15 +3779,12 @@ add_file(const char *path,
if (tree_conflict != NULL)
{
- svn_stringbuf_t *log_accum = NULL;
-
/* Record the conflict so that the file is skipped silently
by the other callbacks. */
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&log_accum,
+ SVN_ERR(svn_wc__loggy_add_tree_conflict(eb->db,
+ pb->local_abspath,
tree_conflict,
subpool));
- SVN_ERR(svn_wc__wq_add_loggy(eb->db, pb->local_abspath,
- log_accum, subpool));
SVN_ERR(remember_skipped_tree(eb, fb->local_abspath));
fb->skip_this = TRUE;
@@ -3934,12 +3889,8 @@ open_file(const char *path,
/* Is this path the victim of a newly-discovered tree conflict? */
if (tree_conflict)
{
- svn_stringbuf_t *log_accum = NULL;
-
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&log_accum, tree_conflict,
- pool));
- SVN_ERR(svn_wc__wq_add_loggy(eb->db, pb->local_abspath, log_accum,
- pool));
+ SVN_ERR(svn_wc__loggy_add_tree_conflict(eb->db, pb->local_abspath,
+ tree_conflict, pool));
if (tree_conflict->reason == svn_wc_conflict_reason_deleted ||
tree_conflict->reason == svn_wc_conflict_reason_replaced)
@@ -4074,7 +4025,7 @@ apply_textdelta(void *file_baton,
finished inventing yet.)
*/
- if (! fb->added)
+ if (! fb->adding_file)
{
if (replaced)
SVN_ERR(svn_wc__get_revert_contents(&source, fb->edit_baton->db,
@@ -4283,7 +4234,7 @@ install_text_base(svn_stringbuf_t **log_
* update all metadata so that the working copy believes it has a new
* working revision of the file. All of this work includes being
* sensitive to eol translation, keyword substitution, and performing
- * all actions accumulated to FB->DIR_BATON->LOG_ACCUM.
+ * all actions accumulated the parent directory's work queue.
*
* If there's a new text base, NEW_TEXT_BASE_ABSPATH must be the full
* pathname of the new text base, somewhere in the administrative area
@@ -4377,7 +4328,7 @@ merge_file(svn_stringbuf_t **log_accum,
else if (entry && entry->file_external_path
&& entry->schedule == svn_wc_schedule_replace) /* ###EBUG */
is_locally_modified = FALSE;
- else if (! fb->existed)
+ else if (! fb->obstruction_found)
SVN_ERR(svn_wc__internal_text_modified_p(&is_locally_modified, eb->db,
fb->local_abspath, FALSE, FALSE,
pool));
@@ -4407,26 +4358,24 @@ merge_file(svn_stringbuf_t **log_accum,
/* For 'textual' merging, we implement this matrix.
- Text file Binary File
- -----------------------------------------------
- "Local Mods" && | svn_wc_merge uses diff3, | svn_wc_merge |
- (!fb->existed || | possibly makes backups & | makes backups, |
- fb->add_existed) | marks file as conflicted.| marks conflicted |
- -----------------------------------------------
- "Local Mods" && | Just leave obstructing file as-is. |
- fb->existed | |
- -----------------------------------------------
- No Mods | Just overwrite working file. |
- | |
- -----------------------------------------------
- File is Locally | Same as if 'No Mods' except we |
- Deleted | don't move the new text base to |
- | the working file location. |
- -----------------------------------------------
- File is Locally | Install the new text base. |
- Replaced | Leave working file alone. |
- | |
- -----------------------------------------------
+ Text file Binary File
+ -----------------------------------------------
+ "Local Mods" && | svn_wc_merge uses diff3, | svn_wc_merge |
+ (!fb->obstruction_found || | possibly makes backups & | makes backups, |
+ fb->add_existed) | marks file as conflicted.| marks conflicted |
+ -----------------------------------------------
+ "Local Mods" && | Just leave obstructing file as-is. |
+ fb->obstruction_found | |
+ -----------------------------------------------
+ No Mods | Just overwrite working file. |
+ -----------------------------------------------
+ File is Locally | Same as if 'No Mods' except we |
+ Deleted | don't copy the new text base to |
+ | the working file location. |
+ -----------------------------------------------
+ File is Locally | Install the new text base. |
+ Replaced | Leave working file alone. |
+ -----------------------------------------------
So the first thing we do is figure out where we are in the
matrix. */
@@ -4475,7 +4424,7 @@ merge_file(svn_stringbuf_t **log_accum,
SVN_WC__FLUSH_LOG_ACCUM(eb->db, pb->local_abspath, *log_accum,
pool);
}
- else if (! fb->existed)
+ else if (! fb->obstruction_found)
/* Working file exists and has local mods
or is scheduled for addition but is not an obstruction. */
{
@@ -4654,11 +4603,11 @@ merge_file(svn_stringbuf_t **log_accum,
/* Log commands to handle text-timestamp and working-size,
if the file is - or will be - unmodified and schedule-normal */
if (!is_locally_modified &&
- (fb->added || entry->schedule == svn_wc_schedule_normal))
+ (fb->adding_file || entry->schedule == svn_wc_schedule_normal))
{
/* Adjust working copy file unless this file is an allowed
obstruction. */
- if (fb->last_changed_date && !fb->existed)
+ if (fb->last_changed_date && !fb->obstruction_found)
SVN_ERR(svn_wc__loggy_set_timestamp(
log_accum, pb->local_abspath,
fb->local_abspath, fb->last_changed_date,
@@ -4875,14 +4824,14 @@ close_file(void *file_baton,
tree. Behaviors are quite different based on the original state. */
SVN_ERR(svn_wc__get_entry(&entry, eb->db, fb->local_abspath, TRUE,
svn_node_file, FALSE, pool, pool));
- if (! entry && ! fb->added)
+ if (! entry && ! fb->adding_file)
return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
_("'%s' is not under version control"),
svn_dirent_local_style(fb->local_abspath, pool));
/* add_file() was called, or there was an added node here. Ensure that
we have a BASE node to work with. */
- if (fb->added || fb->add_existed)
+ if (fb->adding_file || fb->add_existed)
{
SVN_ERR(construct_base_node(eb->db, fb->local_abspath,
*eb->target_revision,
@@ -5003,12 +4952,12 @@ close_file(void *file_baton,
if (fb->deleted)
action = svn_wc_notify_update_add_deleted;
- else if (fb->existed || fb->add_existed)
+ else if (fb->obstruction_found || fb->add_existed)
{
if (content_state != svn_wc_notify_state_conflicted)
action = svn_wc_notify_exists;
}
- else if (fb->added)
+ else if (fb->adding_file)
{
action = svn_wc_notify_update_add;
}