aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_wc
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
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')
-rw-r--r--subversion/libsvn_wc/conflicts.c18
-rw-r--r--subversion/libsvn_wc/update_editor.c61
-rw-r--r--subversion/libsvn_wc/wc-checks.h2
-rw-r--r--subversion/libsvn_wc/wc-metadata.h2
-rw-r--r--subversion/libsvn_wc/wc-queries.h2
5 files changed, 62 insertions, 23 deletions
diff --git a/subversion/libsvn_wc/conflicts.c b/subversion/libsvn_wc/conflicts.c
index ae0b348c354c..f04c6de59481 100644
--- a/subversion/libsvn_wc/conflicts.c
+++ b/subversion/libsvn_wc/conflicts.c
@@ -1622,7 +1622,14 @@ build_text_conflict_resolve_items(svn_skel_t **work_items,
}
case svn_wc_conflict_choose_mine_full:
{
- install_from_abspath = mine_abspath;
+ /* In case of selecting to resolve the conflict choosing the full
+ own file, allow the text conflict resolution to just take the
+ existing local file if no merged file was present (case: binary
+ file conflicts do not generate a locally merge file).
+ */
+ install_from_abspath = mine_abspath
+ ? mine_abspath
+ : local_abspath;
break;
}
case svn_wc_conflict_choose_theirs_conflict:
@@ -1633,6 +1640,15 @@ build_text_conflict_resolve_items(svn_skel_t **work_items,
? svn_diff_conflict_display_latest
: svn_diff_conflict_display_modified;
+ if (mine_abspath == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Conflict on '%s' cannot be resolved to "
+ "'theirs-conflict' or 'mine-conflict' "
+ "because a merged version of the file "
+ "cannot be created."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
SVN_ERR(merge_showing_conflicts(&install_from_abspath,
db, local_abspath,
style, merge_options,
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
diff --git a/subversion/libsvn_wc/wc-checks.h b/subversion/libsvn_wc/wc-checks.h
index 35f15336f3fd..09d43fb5356b 100644
--- a/subversion/libsvn_wc/wc-checks.h
+++ b/subversion/libsvn_wc/wc-checks.h
@@ -1,4 +1,4 @@
-/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h.
* Do not edit this file -- edit the source and rerun gen-make.py */
#define STMT_VERIFICATION_TRIGGERS 0
diff --git a/subversion/libsvn_wc/wc-metadata.h b/subversion/libsvn_wc/wc-metadata.h
index 7b74d83740d5..5ff8744e0a8c 100644
--- a/subversion/libsvn_wc/wc-metadata.h
+++ b/subversion/libsvn_wc/wc-metadata.h
@@ -1,4 +1,4 @@
-/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h.
* Do not edit this file -- edit the source and rerun gen-make.py */
#define STMT_CREATE_SCHEMA 0
diff --git a/subversion/libsvn_wc/wc-queries.h b/subversion/libsvn_wc/wc-queries.h
index ad5ccb57355d..8621cb8b5310 100644
--- a/subversion/libsvn_wc/wc-queries.h
+++ b/subversion/libsvn_wc/wc-queries.h
@@ -1,4 +1,4 @@
-/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.9.4/subversion/libsvn_wc/token-map.h.
+/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.9.5/subversion/libsvn_wc/token-map.h.
* Do not edit this file -- edit the source and rerun gen-make.py */
#define STMT_SELECT_NODE_INFO 0