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

Re: svn commit: r33215 - trunk/subversion/libsvn_fs

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Sun, 21 Sep 2008 22:13:03 +0200

2008-09-21 04:28:00 Greg Stein napisaƂ(a):
> I don't understand this change at all. svn_fs_new() is the same as
> fs_new(). What actually *changed* here? And why?

This change removed 4 deprecation warnings.

> On Sat, Sep 20, 2008 at 12:54 PM, <arfrever_at_tigris.org> wrote:
> > Author: arfrever
> > Date: Sat Sep 20 12:54:23 2008
> > New Revision: 33215
> >
> > Log:
> > Use fs_new() instead of deprecated svn_fs_new().
> >
> > * subversion/libsvn_fs/fs-loader.c
> > (fs_new): Renamed from svn_fs_new().
> > (svn_fs_new): Wrap fs_new().
> > (svn_fs_create, svn_fs_open, svn_fs_upgrade, svn_fs_recover): Use fs_new()
> > instead of deprecated svn_fs_new().
> >
> > Modified:
> > trunk/subversion/libsvn_fs/fs-loader.c
> >
> > Modified: trunk/subversion/libsvn_fs/fs-loader.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs/fs-loader.c?pathrev=33215&r1=33214&r2=33215
> > ==============================================================================
> > --- trunk/subversion/libsvn_fs/fs-loader.c Sat Sep 20 12:17:34 2008 (r33214)
> > +++ trunk/subversion/libsvn_fs/fs-loader.c Sat Sep 20 12:54:23 2008 (r33215)
> > @@ -354,10 +354,9 @@ path_valid(const char *path, apr_pool_t
> > return SVN_NO_ERROR;
> > }
> >
> > -/* This API is publicly deprecated, but we continue to use it
> > - internally to properly allocate svn_fs_t structures. */
> > +/* Allocate svn_fs_t structure. */
> > svn_fs_t *
> > -svn_fs_new(apr_hash_t *fs_config, apr_pool_t *pool)
> > +fs_new(apr_hash_t *fs_config, apr_pool_t *pool)
> > {
> > svn_fs_t *fs = apr_palloc(pool, sizeof(*fs));
> > fs->pool = pool;
> > @@ -371,6 +370,12 @@ svn_fs_new(apr_hash_t *fs_config, apr_po
> > return fs;
> > }
> >
> > +svn_fs_t *
> > +svn_fs_new(apr_hash_t *fs_config, apr_pool_t *pool)
> > +{
> > + return fs_new(fs_config, pool);
> > +}
> > +
> > void
> > svn_fs_set_warning_func(svn_fs_t *fs, svn_fs_warning_callback_t warning,
> > void *warning_baton)
> > @@ -400,7 +405,7 @@ svn_fs_create(svn_fs_t **fs_p, const cha
> > SVN_ERR(write_fs_type(path, fs_type, pool));
> >
> > /* Perform the actual creation. */
> > - *fs_p = svn_fs_new(fs_config, pool);
> > + *fs_p = fs_new(fs_config, pool);
> > SVN_ERR(acquire_fs_mutex());
> > err = vtable->create(*fs_p, path, pool, common_pool);
> > err2 = release_fs_mutex();
> > @@ -421,7 +426,7 @@ svn_fs_open(svn_fs_t **fs_p, const char
> > fs_library_vtable_t *vtable;
> >
> > SVN_ERR(fs_library_vtable(&vtable, path, pool));
> > - *fs_p = svn_fs_new(fs_config, pool);
> > + *fs_p = fs_new(fs_config, pool);
> > SVN_ERR(acquire_fs_mutex());
> > err = vtable->open_fs(*fs_p, path, pool, common_pool);
> > err2 = release_fs_mutex();
> > @@ -442,7 +447,7 @@ svn_fs_upgrade(const char *path, apr_poo
> > svn_fs_t *fs;
> >
> > SVN_ERR(fs_library_vtable(&vtable, path, pool));
> > - fs = svn_fs_new(NULL, pool);
> > + fs = fs_new(NULL, pool);
> > SVN_ERR(acquire_fs_mutex());
> > err = vtable->upgrade_fs(fs, path, pool, common_pool);
> > err2 = release_fs_mutex();
> > @@ -493,7 +498,7 @@ svn_fs_recover(const char *path,
> > svn_fs_t *fs;
> >
> > SVN_ERR(fs_library_vtable(&vtable, path, pool));
> > - fs = svn_fs_new(NULL, pool);
> > + fs = fs_new(NULL, pool);
> > SVN_ERR(acquire_fs_mutex());
> > err = vtable->open_fs_for_recovery(fs, path, pool, common_pool);
> > err2 = release_fs_mutex();
> >

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-09-21 22:17:10 CEST

This is an archived mail posted to the Subversion Dev mailing list.