You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2001/12/01 08:54:54 UTC
Re: [PATCH] Make working copies read-only.
Greg Hudson wrote:
>On Fri, 2001-11-30 at 09:02, Kevin Pilch-Bisson wrote:
>
>>>>Also even if we didn't we wind up with a read-only file in the working copy.
>>>>
>
>We should only wind up with a read-only file in the working copy if we
>open it read-only when we create it or set it read-only afterwards.
>We're doing the copy here; we can open the target file with whatever
>mode we want. If svn_io_copy_file() or apr_copy_file() does the wrong
>thing for this purpose, then we should make it more flexible or create a
>variant; playing games with umask to compensate is going in the wrong
>direction.
>
Right. I think it's also time somebody (me :-) pointed out that umasks
and permission bits are a Unix-ism, and what you're doing here does not
map nicely to (for instance) the read-only bit on Windows filesystems.
We need a more abstract interface that doesn't mix write-protection and
file permissions. For example:
apr_file_[get/set]_perms
apr_file_ [get/set]_read_only
apr_file_[get/set]_executable
On Unix, all of these would all map to twiddling permission bits. On
Windows, for instance, the first would touch the file's ACL, the second
would touch it's read-only bit, and the third is a no-op. And Subversion
doesn't need (and shouldn't use, IMO) the first at all.
--
Brane �ibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Make working copies read-only.
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> Right. I think it's also time somebody (me :-) pointed out that umasks
> and permission bits are a Unix-ism, and what you're doing here does
> not map nicely to (for instance) the read-only bit on Windows
> filesystems. We need a more abstract interface that doesn't mix
> write-protection and file permissions. For example:
>
> apr_file_[get/set]_perms
> apr_file_ [get/set]_read_only
> apr_file_[get/set]_executable
>
> On Unix, all of these would all map to twiddling permission bits. On
> Windows, for instance, the first would touch the file's ACL, the
> second would touch it's read-only bit, and the third is a no-op. And
> Subversion doesn't need (and shouldn't use, IMO) the first at all.
Mmmmm. Excellent thinking. Kevin, how do you feel about doing it
this way?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org