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

Re: svn commit: r1682265 - /subversion/trunk/subversion/libsvn_fs_fs/util.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Thu, 28 May 2015 20:18:38 +0300

On 28 May 2015 at 20:11, Philip Martin <philip.martin_at_wandisco.com> wrote:
> Ivan Zhakov <ivan_at_visualsvn.com> writes:
>
>> 1. Make svn_io_file_name() consistently return error for cross volume
>> renames by fixing APR or using platform specific code.
>> 2. For all platforms handle APR_STATUS_IS_EXDEV() like this: copy file
>> to temporary file in the same folder as destination and then rename
>> it.
>>
>> I'm ready to implement it if nobody object.
>
> We do most (all?) of that. svn_io_file_rename() calls apr_file_rename()
> and on Unix that calls rename() which can fail with EXDEV. When that
> happens svn_io_file_rename() fails.
I meant to add platform specific code to svn_io_file_rename() to also
fail with EXDEV on Windows for cross-volume copies. It could be nice
to fix in APR, but they seem to ignore our patches :(

> svn_io_file_move() catches EXDEV and copies the file to a temporary in
> the destination directory and then calls apr_file_rename().
>
The svn_io_file_moves() catches EXDEV and perform copy to temp +
rename on all platforms, while svn_fs_fs__move_into_place() on Windows
doesn't. It relies to the fact that svn_io_file_rename() never fails
in Windows, which is should be fixed imo.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com
Received on 2015-05-28 19:19:57 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.