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

Re: Cross-device link problem with 1.7.x

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Mon, 7 Nov 2011 22:41:48 +0200

Specifically, I see an error with 1.7.0 when I do:

% cd greek-tree-wc
% rm -rf A/D
% mkdir A/D
% sudo mount -t tmpfs -o size=1M tmpfs $PWD/A/D
% $svn revert -R .
subversion/svn/revert-cmd.c:80: (apr_err=18)
subversion/libsvn_client/revert.c:196: (apr_err=18)
subversion/libsvn_client/revert.c:106: (apr_err=18)
subversion/libsvn_client/revert.c:106: (apr_err=18)
subversion/libsvn_subr/sqlite.c:179: (apr_err=18)
subversion/libsvn_wc/adm_ops.c:1741: (apr_err=18)
subversion/libsvn_wc/adm_ops.c:1741: (apr_err=18)
subversion/libsvn_wc/adm_ops.c:1741: (apr_err=18)
subversion/libsvn_wc/adm_ops.c:1692: (apr_err=18)
subversion/libsvn_wc/workqueue.c:1568: (apr_err=18)
subversion/libsvn_wc/workqueue.c:1486: (apr_err=18)
subversion/libsvn_wc/workqueue.c:764: (apr_err=18)
subversion/libsvn_subr/io.c:3370: (apr_err=18)
svn: E000018: Can't move '/tmp/svn/wc1/.svn/tmp/svn-wmeVIN' to '/tmp/svn/wc1/trunk/A/D/gamma': Invalid cross-device link
zsh: exit 1 $SVN revert -R .

Stephane: in the future please spell out a precise list of steps needed
to reproduce the error you see. We would rather spend our times
thinking about how to fix bugs than guessing how to create them.
Thanks.

Stephane D'Alu wrote on Mon, Nov 07, 2011 at 19:15:33 +0100:
> Hi,
>
> I've been using subversion with a working copy crossing mount point
> without problem until 1.7.x, (this was perfect to manage unix
> configuration files instead of using RCS)
>
> Would it be possible to go back to the same behavior as the previous
> versions, where performing a commit (I'm using svn:keywords) doesn't
> generate a cross device link error.
>
>
> By performing for example a copy/remove if the rename fails with an
> EXDEV error.
>
> Something in svn_io_file_rename like that
>
> status = apr_file_rename(from_path_apr, to_path_apr, pool);
> if (APR_STATUS_IS_EXDEV(status)) {
> (status = apr_file_copy(from_path_apr, to_path_apr,
> APR_FILE_SOURCE_PERMS, pool)) &&
> (status = apr_file_remove(from_path_apr, pool));
> }
>
>
> This was a dirty hack to fix my problem, but i'm sure special cases
> must be added to take care of atomicity and to handle directory.
>
>
> Perhaps a better way to handle this is to create the temporary file
> in the same directory as the file that it must replace.
>
> Sincerely
Received on 2011-11-07 21:43:52 CET

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.