[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 07 Oct 2008 15:54:55 +0100

On Tue, 2008-10-07 at 06:49 -0700, Paul Charlton wrote:
> Alan,
> Thanks for the good research went into the root cause and a workaround, but
> should we consider fixing APR instead of adding the workaround to the APR
> client (ie: Subversion)?
>
> Your research clearly shows that APR is producing different results on
> different platforms, which is contradictory to its stated goal of being the
> "portable runtime".

Yes, it is desirable to get the fix into APR, but it is often easiest to
do this by developing it here first and getting the semantics clear and
the implementation tested, and then propose it to the APR project, and
then we probably want to keep the work-around in Subversion for a year
or more while APR distributions catch up.

- Julian

> thanks in advance for your consideration,
> Paul
>
> -----Original Message-----
> From: Alan Wood [mailto:alan.wood_at_clear.net.nz]
> Sent: Tuesday, October 07, 2008 2:26 AM
> 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.
>
> 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.
>
> Alan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>

---------------------------------------------------------------------
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 16:55:17 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.