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

Cross-device link problem with 1.7.x

From: Stephane D'Alu <Stephane.DAlu_at_insa-lyon.fr>
Date: Mon, 07 Nov 2011 19:15:33 +0100


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.

Received on 2011-11-07 19:43:19 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.