On Fri, Feb 17, 2012 at 01:16:36AM +0100, Stefan Sperling wrote:
> On Wed, Jul 07, 2010 at 06:44:27AM -0000, hwri...@apache.org wrote:
> > Author: hwright
> > Date: Wed Jul  7 06:44:26 2010
> > New Revision: 961254
> > 
> > URL: http://svn.apache.org/viewvc?rev=961254&view=rev
> > Log:
> > Remove a hacky use of a libsvn_wc function, by reusing some existing
> > libsvn_client code.
> > 
> 
> It seems that this commit caused issue #4052 ("reintegrate merge and
> deleted symbolic links"). The svn_wc__versioned_file_modcheck() function
> handled symlinks differently (via compare_and_verify()). As of this change
> we fail to compare symlinks with one another and raise a tree-conflict
> when deleting a symlink in libsvn_client/merge.c:merge_file_deleted().

Running tests on this rather simple patch now.
It makes the issue #4052 test happy, at least.

Index: subversion/tests/cmdline/merge_reintegrate_tests.py
===================================================================
--- subversion/tests/cmdline/merge_reintegrate_tests.py (revision 1245258)
+++ subversion/tests/cmdline/merge_reintegrate_tests.py (working copy)
@@ -2544,7 +2544,6 @@ def reintegrate_replaced_source(sbox):
   
 #----------------------------------------------------------------------
 @SkipUnless(svntest.main.is_posix_os)
-@XFail()
 @Issue(4052)
 def reintegrate_symlink_deletion(sbox):
   "reintegrate symlink deletion"
Index: subversion/libsvn_client/merge.c
===================================================================
--- subversion/libsvn_client/merge.c    (revision 1245258)
+++ subversion/libsvn_client/merge.c    (working copy)
@@ -1995,10 +1995,14 @@ files_same_p(svn_boolean_t *same,
       svn_opt_revision_t working_rev = { svn_opt_revision_working, { 0 } };
 
       /* Compare the file content, translating 'mine' to 'normal' form. */
-      SVN_ERR(svn_client__get_normalized_stream(&mine_stream, wc_ctx,
-                                                mine_abspath, &working_rev,
-                                                FALSE, TRUE, NULL, NULL,
-                                                scratch_pool, scratch_pool));
+      if (svn_prop_get_value(working_props, SVN_PROP_SPECIAL) != NULL)
+        SVN_ERR(svn_subst_read_specialfile(&mine_stream, mine_abspath,
+                                           scratch_pool, scratch_pool));
+      else
+        SVN_ERR(svn_client__get_normalized_stream(&mine_stream, wc_ctx,
+                                                  mine_abspath, &working_rev,
+                                                  FALSE, TRUE, NULL, NULL,
+                                                  scratch_pool, scratch_pool));
 
       SVN_ERR(svn_stream_open_readonly(&older_stream, older_abspath,
                                        scratch_pool, scratch_pool));

Reply via email to