David, thanks for taking the initiative. The patch that you committed
wasn't quite what I suggested (and in fact looks inaccurate). Here's the
meaningful delta:
--- subversion/libsvn_repos/repos.c (revision 16365)
+++ subversion/libsvn_repos/repos.c (working copy)
@@ -1671,7 +1671,7 @@
cfg_fs_type = apr_hash_get (fs_config, SVN_FS_CONFIG_FS_TYPE,
APR_HASH_KEY_STRING);
if (cfg_fs_type)
- cfg_fs_type = DEFAULT_FS_TYPE;
+ repos->fs_type = cfg_fs_type;
/* Create the various files and subdirectories for the repository. */
SVN_ERR_W (create_repos_structure (repos, path, pool),
Without this change, repos->fs_type will never be set.
On Fri, 30 Sep 2005, David James wrote:
> On 9/29/05, Daniel L. Rall <dlr@finemaltcoding.com> wrote:
> > On Fri, 30 Sep 2005, Chia-liang Kao wrote:
> > > Log:
> > > Fix check-swig-pl failures.
> > >
> > > * libsvn_repos/repos.c:
> > > (svn_repos_create) Allow fs_config to be null, as svn_repos.h says so.
> > >
> > That would leave repos->fs_type uninitialized if fs_config was NULL. How
> > about this?
> >
> > --- subversion/libsvn_repos/repos.c (revision 16360)
> > +++ subversion/libsvn_repos/repos.c (working copy)
> > @@ -1545,6 +1545,7 @@
> > repos->conf_path = svn_path_join (path, SVN_REPOS__CONF_DIR, pool);
> > repos->hook_path = svn_path_join (path, SVN_REPOS__HOOK_DIR, pool);
> > repos->lock_path = svn_path_join (path, SVN_REPOS__LOCK_DIR, pool);
> > + repos->fs_type = DEFAULT_FS_TYPE;
> >
> > return repos;
> > }
> > @@ -1659,16 +1660,18 @@
> > {
> > svn_repos_t *repos;
> > svn_error_t *err;
> > + const char *cfg_fs_type = NULL;
> >
> > /* Allocate a repository object, filling in the format we will create. */
> > repos = create_svn_repos_t (path, pool);
> > repos->format = SVN_REPOS__FORMAT_NUMBER;
> >
> > /* Discover the type of the filesystem we are about to create. */
> > - repos->fs_type = apr_hash_get (fs_config, SVN_FS_CONFIG_FS_TYPE,
> > - APR_HASH_KEY_STRING);
> > - if (! repos->fs_type)
> > - repos->fs_type = DEFAULT_FS_TYPE;
> > + if (fs_config)
> > + cfg_fs_type = apr_hash_get (fs_config, SVN_FS_CONFIG_FS_TYPE,
> > + APR_HASH_KEY_STRING);
> > + if (cfg_fs_type)
> > + repos->fs_type = cfg_fs_type;
>
> Thanks, Daniel. Your patch fixes crashes in the Python bindings as
> well. I've committed your patch in r16365.
>
> Cheers,
>
> David
>
> --
> David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 30 09:40:21 2005