aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_wc/update_editor.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2016-12-01 07:45:05 +0000
committerPeter Wemm <peter@FreeBSD.org>2016-12-01 07:45:05 +0000
commit608944fa5a78d7f517c9c73a7ded6c130cc97b83 (patch)
tree9dce7c56ce4cbd36bb5457661d50b23d30c3533c /subversion/libsvn_wc/update_editor.c
parentc94cceea9c2262c5b2ad5f215bb9a8ae48b02764 (diff)
downloadsrc-608944fa5a78d7f517c9c73a7ded6c130cc97b83.tar.gz
src-608944fa5a78d7f517c9c73a7ded6c130cc97b83.zip
Import subversion-1.9.5.vendor/subversion/subversion-1.9.5
This includes a security fix for a component that we do not build, and two potentially useful client side fixes for reintegrate merges and tree conflict handling. See CHANGES for full details.
Notes
Notes: svn path=/vendor/subversion/dist/; revision=309354 svn path=/vendor/subversion/subversion-1.9.5/; revision=309355; tag=vendor/subversion/subversion-1.9.5
Diffstat (limited to 'subversion/libsvn_wc/update_editor.c')
-rw-r--r--subversion/libsvn_wc/update_editor.c61
1 files changed, 42 insertions, 19 deletions
diff --git a/subversion/libsvn_wc/update_editor.c b/subversion/libsvn_wc/update_editor.c
index 5f4d64826713..4dca3af7e13f 100644
--- a/subversion/libsvn_wc/update_editor.c
+++ b/subversion/libsvn_wc/update_editor.c
@@ -2883,10 +2883,7 @@ absent_node(const char *path,
if (pb->skip_this)
return SVN_NO_ERROR;
- SVN_ERR(mark_directory_edited(pb, scratch_pool));
-
local_abspath = svn_dirent_join(pb->local_abspath, name, scratch_pool);
-
/* If an item by this name is scheduled for addition that's a
genuine tree-conflict. */
err = svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
@@ -2906,6 +2903,10 @@ absent_node(const char *path,
kind = svn_node_unknown;
}
+ if (status != svn_wc__db_status_server_excluded)
+ SVN_ERR(mark_directory_edited(pb, scratch_pool));
+ /* Else fall through as we should update the revision anyway */
+
if (status == svn_wc__db_status_normal)
{
svn_boolean_t wcroot;
@@ -2929,31 +2930,53 @@ absent_node(const char *path,
}
else
{
- /* The server asks us to replace a file external
- (Existing BASE node; not reported by the working copy crawler or
- there would have been a delete_entry() call.
-
- There is no way we can store this state in the working copy as
- the BASE layer is already filled.
+ svn_boolean_t file_external;
+ svn_revnum_t revnum;
- We could error out, but that is not helping anybody; the user is not
- even seeing with what the file external would be replaced, so let's
- report a skip and continue the update.
- */
+ SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &revnum, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ &file_external,
+ eb->db, local_abspath,
+ scratch_pool, scratch_pool));
- if (eb->notify_func)
+ if (file_external)
{
- svn_wc_notify_t *notify;
- notify = svn_wc_create_notify(
+ /* The server asks us to replace a file external
+ (Existing BASE node; not reported by the working copy crawler
+ or there would have been a delete_entry() call.
+
+ There is no way we can store this state in the working copy as
+ the BASE layer is already filled.
+ We could error out, but that is not helping anybody; the user is not
+ even seeing with what the file external would be replaced, so let's
+ report a skip and continue the update.
+ */
+
+ if (eb->notify_func)
+ {
+ svn_wc_notify_t *notify;
+ notify = svn_wc_create_notify(
local_abspath,
svn_wc_notify_update_skip_obstruction,
scratch_pool);
- eb->notify_func(eb->notify_baton, notify, scratch_pool);
+ eb->notify_func(eb->notify_baton, notify, scratch_pool);
+ }
+
+ svn_pool_destroy(scratch_pool);
+ return SVN_NO_ERROR;
}
+ else
+ {
+ /* We have a normal local node that will now be hidden for the
+ user. Let's try to delete what is there. This may introduce
+ tree conflicts if there are local changes */
+ SVN_ERR(delete_entry(path, revnum, pb, scratch_pool));
- svn_pool_destroy(scratch_pool);
- return SVN_NO_ERROR;
+ /* delete_entry() promises that BASE is empty after the operation,
+ so we can just fall through now */
+ }
}
}
else if (status == svn_wc__db_status_not_present