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

Re: Problem with svn_wc_process_committed

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-07-12 20:53:16 CEST

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> Philip Martin <philip@codematters.co.uk> writes:
> >
> > svn_error_t *
> > svn_wc_adm_open(svn_wc_adm_access_t **adm_access,
> > svn_wc_adm_access_t *parent_access,
> > const char *path,
> > svn_boolean_t write_lock,
> > apr_pool_t *pool);
>
> Yick.
>
> If we need a hierarchy, can it at least be hidden inside the access_t
> structures? Passing two of them in the public interfaces seems
> awkward...

I don't think it's that bad, it's rather like creating subpools. It
gets used like this

    some_function (svn_wc_adm_access_t *adm_access, ... )
    {
      /* Recursively loop over all children. */
      for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
        {
          apr_hash_this (hi, &key, NULL, &val);
          name = key;
          current_entry = val;
        
          if (current_entry->kind == svn_node_dir)
            {
               /* Lock subdirs */
               svn_wc_adm_open (&child_access, adm_access, ... );
               some_function (child_access, ...);
            }
        }
     }

This is much like the present code except svn_wc_adm_open call doesn't
take the second baton, and there is generally an svn_wc_adm_close call
after some_function. The close call may or may not get removed,
dependes whether we want to retain the cache. If it's not closed
explicitly I envisage that it gets closed automatically when the
parent gets closed.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 12 20:53:48 2002

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.