"David O'Shea" <david.oshea_at_s3group.com> writes:
> Updated patch attached. This now explicitly checks the target's
> "special" status instead of relying on is_binary (should have done
> that in the first place really...)
> "make check" passes with this patch.
Thanks (and thanks for testing it). See comments below...
> Fix a file not found error when a merge target is a broken symbolic link.
> * subversion/libsvn_wc/merge.c
> (svn_wc__merge_internal): Diff translated target file if special.
> * subversion/tests/cmdlink/merge_tests.py
> (merge_broken_link): New test function.
> (test_list): Call the new test function.
> Index: subversion/libsvn_wc/merge.c
> --- subversion/libsvn_wc/merge.c (revision 31119)
> +++ subversion/libsvn_wc/merge.c (working copy)
> @@ -674,9 +674,16 @@
> - svn_boolean_t same;
> + svn_boolean_t same, special;
> + /* Make sure we use the repository normalised form of the
> + target file if it is special (i.e. don't try to follow
> + symlinks). */
> + SVN_ERR(svn_wc__get_special(&special, merge_target, adm_access, pool));
> SVN_ERR(svn_io_files_contents_same_p(&same, result_target,
> - merge_target, pool));
> + (special ?
> + tmp_target :
> + merge_target),
> + pool));
> *merge_outcome = same ? svn_wc_merge_unchanged : svn_wc_merge_merged;
Hmmm. If the goal is to check for symlinks, not just specialness, maybe
it would be a good idea to check that the contents of the special file
begins with "link:", indicating a symlink? There may be other kinds of
special files in the future...
Hmm, then again, it's highly likely that future kinds of special files
would want the same treatment anyway. So I've just adjusted the comment
a bit to talk about that; I'm running 'make check' now (paranoia, I know
you already did it) and will commit soon.
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-12 20:47:02 CEST