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

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

From: Bert Huijben <b.huijben_at_competence.biz>
Date: Tue, 7 Oct 2008 12:15:36 +0200

> -----Original Message-----
> From: Alan Wood [mailto:alan.wood_at_clear.net.nz]
> Sent: dinsdag 7 oktober 2008 11:26
> To: dev_at_subversion.tigris.org
> Cc: Bert Huijben; Jason Wenger
> Subject: [PATCH] Fix for renaming errors on Samba working copies.
>
> 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
> files.

        Hi Alan,

Thanks for this follow up.

> 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
> 'H:\test\test\.svn\dir-prop-base':
> 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.

I see the problem you experience and I think we can resolve it, but your
patch might fail before the original retry loop if the rename fails for
another reason.

If the file is locked the SetAtttributes might fail. In this case
SVN_ERR(..) will return the error before retrying the rename itself.

        Bert

---------------------------------------------------------------------
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 12:15:53 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.