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

Re: svn commit: r31159 - in trunk/subversion: libsvn_wc tests/cmdline

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 14 May 2008 16:17:09 -0400

On Wed, May 14, 2008 at 3:47 PM, Lieven Govaerts <svnlgo_at_mobsol.be> wrote:
> Daniel Shahaf wrote:
>>
>> kfogel_at_tigris.org wrote on Tue, 13 May 2008 at 12:53 -0700:
>>>
>>> Author: kfogel
>>> Date: Tue May 13 12:53:12 2008
>>> New Revision: 31159
>>>
>>> Log:
>>> Fix "file not found" error when a merge target is a broken symbolic link.
>>>
>>> Patch by: David O'Shea
>>> <david.oshea-K2D8ygZuxnlBDgjK7y7TUQ_at_public.gmane.org>
>>>
>>> * subversion/libsvn_wc/merge.c
>>> (svn_wc__merge_internal): Diff against detranslated file if the
>>> target is "special".
>>>
>>> * subversion/tests/cmdlink/merge_tests.py
>>> (merge_broken_link): New test function.
>>> (test_list): Call the new test function.
>>>
>>> Modified:
>>> trunk/subversion/libsvn_wc/merge.c
>>> trunk/subversion/tests/cmdline/merge_tests.py
>>>
>>> Modified: trunk/subversion/libsvn_wc/merge.c
>>> URL:
>>> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/merge.c?pathrev=31159&r1=31158&r2=31159
>>>
>>> ==============================================================================
>>> --- trunk/subversion/libsvn_wc/merge.c Tue May 13 12:20:56 2008
>>> (r31158)
>>> +++ trunk/subversion/libsvn_wc/merge.c Tue May 13 12:53:12 2008
>>> (r31159)
>>> @@ -674,9 +674,18 @@ svn_wc__merge_internal(svn_stringbuf_t *
>>> }
>>> else
>>> {
>>> - svn_boolean_t same;
>>> + svn_boolean_t same, special;
>>> + /* If 'special', then use the detranslated form of the
>>> + target file. This is so we don't try to follow symlinks,
>>> + but the same treatment is probably also appropriate for
>>> + whatever special file types we may invent in the future. */
>>> + 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;
>>> }
>>>
>>> Modified: trunk/subversion/tests/cmdline/merge_tests.py
>>> URL:
>>> http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/merge_tests.py?pathrev=31159&r1=31158&r2=31159
>>>
>>> ==============================================================================
>>> --- trunk/subversion/tests/cmdline/merge_tests.py Tue May 13
>>> 12:20:56 2008 (r31158)
>>> +++ trunk/subversion/tests/cmdline/merge_tests.py Tue May 13
>>> 12:53:12 2008 (r31159)
>>> @@ -11258,6 +11258,7 @@ def merge_chokes_on_renamed_subtrees(sbo
>>> expected_status.tweak('H_COPY/psi_moved', status='MM')
>>> svntest.actions.run_and_verify_status(wc_dir, expected_status)
>>> +
>>> #----------------------------------------------------------------------
>>> # Issue #3157
>>> def dont_explicitly_record_implicit_mergeinfo(sbox):
>>> @@ -11375,6 +11376,32 @@ def dont_explicitly_record_implicit_merg
>>> None, None, None, None, None, 1)
>>> os.chdir(saved_cwd)
>>> +# Test for issue where merging a change to a broken link fails
>>> +def merge_broken_link(sbox):
>>> + "merge with broken symlinks in target"
>>> +
>>> + # Create our good 'ole greek tree.
>>> + sbox.build()
>>> + wc_dir = sbox.wc_dir
>>> + src_path = os.path.join(wc_dir, 'A', 'B', 'E')
>>> + copy_path = os.path.join(wc_dir, 'A', 'B', 'E_COPY')
>>> + link_path = os.path.join(src_path, 'beta_link')
>>> +
>>> + os.symlink('beta_broken', link_path)
>>
>> This breaks the Windows builtbod:
>>
>> AttributeError: 'module' object has no attribute 'symlink'
>> FAIL: merge_tests.py 96: merge with broken symlinks in target
>>
>>
>
> Should this test even run on Windows?

I don't think so. While Vista claims to have "true" symbolic links,
the closest thing XP seems to have is NTFS junction points (which can
only point to directories). But the utility to create junction
points, linkd.exe, isn't part of any standard XP install, it is
available only in the Windows Server 2003 Resource Kit Tools download.
 So I think we are safe skipping this test on Windows. Any
objections?

Paul

---------------------------------------------------------------------
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-14 22:17:25 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.