[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix merging with broken softlink as target

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Mon, 05 May 2008 20:13:46 -0400

"David O'Shea" <david.oshea_at_s3group.com> writes:
> When merging a branch with a symbolic link change onto another branch
> where the original link destination doesn't exist, the merge fails.
>
> (e.g http://svn.haxx.se/dev/archive-2008-02/0772.shtml)
>
> This is a problem in 1.4.x and on the trunk. The attached patch (with
> test included) against the trunk fixes this.

Thanks for the fix (and with a test, too). Some questions...

> [[[
> 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 not binary.
>
> * 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 31014)
> +++ subversion/libsvn_wc/merge.c (working copy)
> @@ -656,7 +656,10 @@
> {
> svn_boolean_t same;
> SVN_ERR(svn_io_files_contents_same_p(&same, result_target,
> - merge_target, pool));
> + (is_binary ?
> + merge_target :
> + tmp_target),
> + pool));
>
> *merge_outcome = same ? svn_wc_merge_unchanged : svn_wc_merge_merged;
> }

I've looked at the context around this change, and I'm still not seeing
the connection between is_binary and broken symbolic links. That's more
a statement about my ignorance than about your patch -- after all, you
did fix the bug! -- but if you could go into more detail about exactly
how this fixes the problem, that would be great. (Putting the
explanation in a comment in the code might be best, in fact.)

-Karl

---------------------------------------------------------------------
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-06 02:13:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.