Author: svn-role
Date: Fri Dec 6 04:00:21 2019
New Revision: 1870900
URL: http://svn.apache.org/viewvc?rev=1870900&view=rev
Log:
Merge the 1.11.x-r1855419 branch:
* r1855419
Fix conflict resolver bug where local and incoming edits got swapped.
Justification:
Bug breaks text conflict resolution.
User complained: https://svn.haxx.se/dev/archive-2019-03/0012.shtml
Branch:
^/subversion/branches/1.11.x-r1855419
Votes:
+1: stsp, rhuijben
Modified:
subversion/branches/1.11.x/ (props changed)
subversion/branches/1.11.x/STATUS
subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c
Propchange: subversion/branches/1.11.x/
------------------------------------------------------------------------------
Merged /subversion/branches/1.11.x-r1855419:r1855422-1870899
Merged /subversion/trunk:r1855419
Modified: subversion/branches/1.11.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.11.x/STATUS?rev=1870900&r1=1870899&r2=1870900&view=diff
==============================================================================
--- subversion/branches/1.11.x/STATUS (original)
+++ subversion/branches/1.11.x/STATUS Fri Dec 6 04:00:21 2019
@@ -32,16 +32,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1855419
- Fix conflict resolver bug where local and incoming edits got swapped.
- Justification:
- Bug breaks text conflict resolution.
- User complained: https://svn.haxx.se/dev/archive-2019-03/0012.shtml
- Branch:
- ^/subversion/branches/1.11.x-r1855419
- Votes:
- +1: stsp, rhuijben
-
* r1856397
Allow generating Visual Studio 2019 projects
Justification:
Modified: subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c?rev=1870900&r1=1870899&r2=1870900&view=diff
==============================================================================
--- subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c (original)
+++ subversion/branches/1.11.x/subversion/libsvn_client/conflicts.c Fri Dec 6
04:00:21 2019
@@ -8707,10 +8707,10 @@ resolve_incoming_move_file_text_merge(sv
if (operation == svn_wc_operation_update ||
operation == svn_wc_operation_switch)
{
- svn_stream_t *working_stream;
+ svn_stream_t *moved_to_stream;
svn_stream_t *incoming_stream;
- /* Create a temporary copy of the working file in repository-normal form.
+ /* Create a temporary copy of the moved file in repository-normal form.
* Set up this temporary file to be automatically removed. */
err = svn_stream_open_unique(&incoming_stream,
&incoming_abspath, wc_tmpdir,
@@ -8719,18 +8719,31 @@ resolve_incoming_move_file_text_merge(sv
if (err)
goto unlock_wc;
- err = svn_wc__translated_stream(&working_stream, ctx->wc_ctx,
- local_abspath, local_abspath,
+ err = svn_wc__translated_stream(&moved_to_stream, ctx->wc_ctx,
+ moved_to_abspath,
+ moved_to_abspath,
SVN_WC_TRANSLATE_TO_NF,
scratch_pool, scratch_pool);
if (err)
goto unlock_wc;
- err = svn_stream_copy3(working_stream, incoming_stream,
+ err = svn_stream_copy3(moved_to_stream, incoming_stream,
NULL, NULL, /* no cancellation */
scratch_pool);
if (err)
goto unlock_wc;
+
+ /* Overwrite the moved file with the conflict victim's content.
+ * Incoming changes will be merged in from the temporary file created
+ * above. This is required to correctly make local changes show up as
+ * 'mine' during the three-way text merge between the ancestor file,
+ * the conflict victim ('mine'), and the moved file ('theirs') which
+ * was brought in by the update/switch operation and occupies the path
+ * of the merge target. */
+ err = svn_io_copy_file(local_abspath, moved_to_abspath, FALSE,
+ scratch_pool);
+ if (err)
+ goto unlock_wc;
}
else if (operation == svn_wc_operation_merge)
{