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

[PATCH] Fix for renaming errors on Samba working copies.

From: Alan Wood <alan.wood_at_clear.net.nz>
Date: Tue, 07 Oct 2008 22:26:05 +1300

Hi All
I am continuing to look into using subversion working copies on
Samba shares. Here is a patch to allow the renaming of read-only

There are other work arounds to this such as changing the Samba
configuration file to include "force create mode 0200" which stops
the files being read-only and also "delete readonly = yes", but
these do not cover the case where the working copy is being used
from both the Samba share and the Linux side.
The "delete readonly = yes" does not appear to effect renames.

This patch checks the error return from the apr_file_rename() and
if the code was access_denied then if resets the read-only flag
and tries again. I have made no attempt to put the read-only flag
back. Note that if we set the read-only flag again that it will
only reset the u+w bit not the g+w if that was set. But sharing
working copies within a group sounds bad to me anyway.

The test that was failing was:
Using TortoiseSVN:
 mkdir test
 svn ps blah blah test
 svn commit -m "this will fail"

The result:
Error: Commit succeeded, but other errors follow:
Error: Error bumping revisions post-commit (details follow):
Error: In directory 'H:\test\test'
Error: Error processing command 'committed' in 'H:\test\test'
Error: Can't move 'H:\test\test\.svn\dir-props' to
Error: Access is denied.

This is repeatable and also shows up on Linux-Linux Samba shares
though in that case the Samba client code should really be fixed.
If someone wants to try this without the WIN32 conditionals then
go for it.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-10-07 11:32:49 CEST

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