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

Re: SVN can't update write-protected files?!?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-01-17 00:06:49 CET

On Sun, 2005-01-16 at 17:29, Joerg Hessdoerfer wrote:
> Ok. But why does it work on Linux, then? Your point is somewhat valid, but
> there's code in SVN that should unprotect the files first, no? And that
> should either work on all platforms or it's a bug...

On Linux (and other Unix-like systems), not having write permission on a
file means you can't change it, but you can still delete it or replace
it if you have appropriate permissions on the directory. Since
Subversion updates files by replacing them, we don't notice the lack of
write permission.

On Windows, the read-only bit means you can't change it, delete it, or
replace it.

> Besides, some proprietary development environments (we use one) use the
> read-only flag to notify them that file contents where not changed by the
> user. So they are set on all locally unmodified files, which SVN would
> probably want to update. On Linux, this works fine, on Windows not ;-(

I can understand the practical frustration here, but your proprietary
development environment is essentially saying "no other tools should
modify this file." Subversion could be modified to ignore the read-only
bit, and it might not be a terrible idea (we know the file is under
version control, so we sorta own it, so it might be okay to override the
read-only bit on it; also, it would probably be a one-line change), but
it's not really worth a ?!? in the subject line that we don't do that.
Would you complain that your editor won't edit the file like you want
to, that a perl script won't modify the files like you want to, and so
forth? Just what do you expect the read-only bit to do?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 17 00:08:24 2005

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.