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

Re: svn commit: r8957 - in trunk/subversion: include libsvn_subr

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-10 15:34:47 CET

philip@tigris.org wrote:
> Author: philip
> Date: Tue Mar 9 16:13:16 2004
> New Revision: 8957
>
> Modified:
> trunk/subversion/include/svn_io.h
> trunk/subversion/libsvn_subr/io.c
> Log:
> Make the repository and working copy format files read-only.

I guess it was totally obvious to you, but my initial reaction to this log message was "Why, exactly? I don't recall a recent discussion of it. Is there a more concrete reason than just to make it less likely to overwritten accidentally? Why this file and not other files?"

Now I think I see the answer: for consistency, i.e. for the same reasons that we already make most of the other important files read-only (not "README" which doesn't need to be preserved, but nor "empty-file" which does).

It would be nice to have an explanatory phrase in the log message, such as, "like we do with the other important files," or "(Issue ####)".

> * subversion/include/svn_io.h (svn_io_write_version_file): Tweak
> documentation.
>
> * subversion/libsvn_subr/io.c (svn_io_write_version_file): Make file
> read-write if open fails, make file read-only after closing.

In cases like this, don't we prefer to try the usual case first, and then fall back to the unusual case? After repositories and working copies have been through this code once, the expected case will be for the file to be read-only, so it would be best to start by setting it read-write before trying to open it.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 10 15:33:58 2004

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.