You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2014/04/22 13:58:49 UTC

Re: svn commit: r1358516 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

On 7 July 2012 11:33,  <st...@apache.org> wrote:
> Author: stefan2
> Date: Sat Jul  7 07:33:41 2012
> New Revision: 1358516
>
> URL: http://svn.apache.org/viewvc?rev=1358516&view=rev
> Log:
> Modify the read_config signature such that it can be used without
> opening the underlying filesystem, i.e. without a proper svn_fs_t.
>
> * subversion/libsvn_fs_fs/fs_fs.c
>   (read_config): change and document signature
>   (svn_fs_fs__open, svn_fs_fs__create): adapt callers
>
> Modified:
>     subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1358516&r1=1358515&r2=1358516&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sat Jul  7 07:33:41 2012
> @@ -1089,15 +1089,17 @@ svn_fs_fs__fs_supports_mergeinfo(svn_fs_
>    return ffd->format >= SVN_FS_FS__MIN_MERGEINFO_FORMAT;
>  }
>
> +/* Read the configuration information of the file system at FS_PATH
> + * and set the respective values in FFD.  Use POOL for allocations.
> + */
>  static svn_error_t *
> -read_config(svn_fs_t *fs,
> +read_config(fs_fs_data_t *ffd,
> +            const char *fs_path,
>              apr_pool_t *pool)
>  {
> -  fs_fs_data_t *ffd = fs->fsap_data;
> -
>    SVN_ERR(svn_config_read2(&ffd->config,
> -                           svn_dirent_join(fs->path, PATH_CONFIG, pool),
> -                           FALSE, FALSE, fs->pool));
> +                           svn_dirent_join(fs_path, PATH_CONFIG, pool),
> +                           FALSE, FALSE, pool));
>
Hi Stefan,

It seems this commit changed pool from which FS->CONFIG is allocated:
before commit CONFIG was allocated from FS->POOL, but now it uses
scratch_pool argument. I've fixed it in r1589097.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Re: svn commit: r1358516 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 23 April 2014 14:20, Stefan Fuhrmann <st...@wandisco.com> wrote:
> On Tue, Apr 22, 2014 at 1:58 PM, Ivan Zhakov <iv...@visualsvn.com> wrote:
>>
>> On 7 July 2012 11:33,  <st...@apache.org> wrote:
>> > Author: stefan2
>> > Date: Sat Jul  7 07:33:41 2012
>> > New Revision: 1358516
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1358516&view=rev
>> > Log:
>> > Modify the read_config signature such that it can be used without
>> > opening the underlying filesystem, i.e. without a proper svn_fs_t.
>> >
>> > * subversion/libsvn_fs_fs/fs_fs.c
>> >   (read_config): change and document signature
>> >   (svn_fs_fs__open, svn_fs_fs__create): adapt callers
>> >
>> > Modified:
>> >     subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
>> >
>> > Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
>> > URL:
>> > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1358516&r1=1358515&r2=1358516&view=diff
>> >
>> > ==============================================================================
>> > --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
>> > +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sat Jul  7 07:33:41
>> > 2012
>> > @@ -1089,15 +1089,17 @@ svn_fs_fs__fs_supports_mergeinfo(svn_fs_
>> >    return ffd->format >= SVN_FS_FS__MIN_MERGEINFO_FORMAT;
>> >  }
>> >
>> > +/* Read the configuration information of the file system at FS_PATH
>> > + * and set the respective values in FFD.  Use POOL for allocations.
>> > + */
>> >  static svn_error_t *
>> > -read_config(svn_fs_t *fs,
>> > +read_config(fs_fs_data_t *ffd,
>> > +            const char *fs_path,
>> >              apr_pool_t *pool)
>> >  {
>> > -  fs_fs_data_t *ffd = fs->fsap_data;
>> > -
>> >    SVN_ERR(svn_config_read2(&ffd->config,
>> > -                           svn_dirent_join(fs->path, PATH_CONFIG,
>> > pool),
>> > -                           FALSE, FALSE, fs->pool));
>> > +                           svn_dirent_join(fs_path, PATH_CONFIG, pool),
>> > +                           FALSE, FALSE, pool));
>> >
>> Hi Stefan,
>>
>> It seems this commit changed pool from which FS->CONFIG is allocated:
>> before commit CONFIG was allocated from FS->POOL, but now it uses
>> scratch_pool argument. I've fixed it in r1589097.
>
>
> Thank you for the fix!
>
No problem.

> In r1589235, I got rid of the FS->FFD->CONFIG struct altogether
> and read_config() actually does *all* the config evaluation.
>
Great! I considered it, but decided do it later but you surpassed me :)

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Re: svn commit: r1358516 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Tue, Apr 22, 2014 at 1:58 PM, Ivan Zhakov <iv...@visualsvn.com> wrote:

> On 7 July 2012 11:33,  <st...@apache.org> wrote:
> > Author: stefan2
> > Date: Sat Jul  7 07:33:41 2012
> > New Revision: 1358516
> >
> > URL: http://svn.apache.org/viewvc?rev=1358516&view=rev
> > Log:
> > Modify the read_config signature such that it can be used without
> > opening the underlying filesystem, i.e. without a proper svn_fs_t.
> >
> > * subversion/libsvn_fs_fs/fs_fs.c
> >   (read_config): change and document signature
> >   (svn_fs_fs__open, svn_fs_fs__create): adapt callers
> >
> > Modified:
> >     subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> >
> > Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> > URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1358516&r1=1358515&r2=1358516&view=diff
> >
> ==============================================================================
> > --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> > +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sat Jul  7 07:33:41
> 2012
> > @@ -1089,15 +1089,17 @@ svn_fs_fs__fs_supports_mergeinfo(svn_fs_
> >    return ffd->format >= SVN_FS_FS__MIN_MERGEINFO_FORMAT;
> >  }
> >
> > +/* Read the configuration information of the file system at FS_PATH
> > + * and set the respective values in FFD.  Use POOL for allocations.
> > + */
> >  static svn_error_t *
> > -read_config(svn_fs_t *fs,
> > +read_config(fs_fs_data_t *ffd,
> > +            const char *fs_path,
> >              apr_pool_t *pool)
> >  {
> > -  fs_fs_data_t *ffd = fs->fsap_data;
> > -
> >    SVN_ERR(svn_config_read2(&ffd->config,
> > -                           svn_dirent_join(fs->path, PATH_CONFIG, pool),
> > -                           FALSE, FALSE, fs->pool));
> > +                           svn_dirent_join(fs_path, PATH_CONFIG, pool),
> > +                           FALSE, FALSE, pool));
> >
> Hi Stefan,
>
> It seems this commit changed pool from which FS->CONFIG is allocated:
> before commit CONFIG was allocated from FS->POOL, but now it uses
> scratch_pool argument. I've fixed it in r1589097.
>

Thank you for the fix!

In r1589235, I got rid of the FS->FFD->CONFIG struct altogether
and read_config() actually does *all* the config evaluation.

-- Stefan^2.