You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Brian W. Fitzpatrick" <fi...@collab.net> on 2005/04/12 15:05:37 UTC

Re: svn commit: r14131 - trunk/subversion/libsvn_fs_fs

On Mon, 2005-04-11 at 17:36 -0500, kfogel@tigris.org wrote:
> Author: kfogel
> Date: Mon Apr 11 17:36:51 2005
> New Revision: 14131
> 
> Modified:
>    trunk/subversion/libsvn_fs_fs/fs_fs.c
> Log:
> Follow up to r13387, on Greg Hudson's advice:
> 
> * subversion/libsvn_fs_fs/fs_fs.c
>   (svn_fs_fs__open): Don't try to create the FS format file if none
>   exists, just assume format 1.
> 
> 
> Modified: trunk/subversion/libsvn_fs_fs/fs_fs.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_fs_fs/fs_fs.c?view=diff&rev=14131&p1=trunk/subversion/libsvn_fs_fs/fs_fs.c&r1=14130&p2=trunk/subversion/libsvn_fs_fs/fs_fs.c&r2=14131
> ==============================================================================
> --- trunk/subversion/libsvn_fs_fs/fs_fs.c	(original)
> +++ trunk/subversion/libsvn_fs_fs/fs_fs.c	Mon Apr 11 17:36:51 2005
> @@ -279,15 +279,20 @@
>    err = svn_io_read_version_file (&format, path_format (fs, pool), pool);
>    if (err && APR_STATUS_IS_ENOENT (err->apr_err))
>      {
> -      /* Pre-1.2 filesystems did not have a format file (you could say
> -         they were format "0"), so they get upgraded on the fly. */
> -      svn_error_clear (err), err = NULL;
> -      format = SVN_FS_FS__FORMAT_NUMBER;
> -      SVN_ERR (svn_io_write_version_file
> -               (path_format (fs, pool), format, pool));
> +      /* Treat an absent format file as format 1.  Do not try to
> +         create the format file on the fly, because the repository
> +         might be read-only for us, or we might have a umask such
> +         that even if we did create the format file, subsequent
> +         users would not be able to read it.

Given that elsewhere we use svn_fs_fs__dup_perms, I don't think that
having the wrong umask is really a valid reason for not creating the
format file (I agree with the spirit of the fix, however).

-Fitz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r14131 - trunk/subversion/libsvn_fs_fs

Posted by kf...@collab.net.
"Brian W. Fitzpatrick" <fi...@collab.net> writes:
> > --- trunk/subversion/libsvn_fs_fs/fs_fs.c	(original)
> > +++ trunk/subversion/libsvn_fs_fs/fs_fs.c	Mon Apr 11 17:36:51 2005
> > @@ -279,15 +279,20 @@
> >    err = svn_io_read_version_file (&format, path_format (fs, pool), pool);
> >    if (err && APR_STATUS_IS_ENOENT (err->apr_err))
> >      {
> > -      /* Pre-1.2 filesystems did not have a format file (you could say
> > -         they were format "0"), so they get upgraded on the fly. */
> > -      svn_error_clear (err), err = NULL;
> > -      format = SVN_FS_FS__FORMAT_NUMBER;
> > -      SVN_ERR (svn_io_write_version_file
> > -               (path_format (fs, pool), format, pool));
> > +      /* Treat an absent format file as format 1.  Do not try to
> > +         create the format file on the fly, because the repository
> > +         might be read-only for us, or we might have a umask such
> > +         that even if we did create the format file, subsequent
> > +         users would not be able to read it.
> 
> Given that elsewhere we use svn_fs_fs__dup_perms, I don't think that
> having the wrong umask is really a valid reason for not creating the
> format file (I agree with the spirit of the fix, however).

Comment tweaked in r14148.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org