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

Re: design document

From: HuiHuang <yellow.flying_at_yahoo.com.cn>
Date: Sat, 30 May 2009 18:45:08 +0800

>Could this be as simple as adding a pointer to a working copy access baton
>to the committable structure, plus a master array of top-level working copy
>access batons (for post-commit releasing)?

This is what I think, too. But Hyrum say that we will just use a single
svn_wc_context_t instead of carrying around a collection of access batons
in the future. So I had better to konw svn_wc_context_t first and then
think about how to use it in my work.

To Hyrum,

Thank you very much. Here I have a question. I find out definitions of
svn_wc_adm_access_t and svn_wc_context_t as following, obviously there
are more information in svn_wc_adm_access_t than in svn_wc_context_t.
So how can svn_wc_context_t replace svn_wc_adm_access_t?

By the way, would you mind to tell me where can I find public API changes
made to libsvn_wc? Thanks~

//In libsvn_wc/lock.c
struct svn_wc_adm_access_t
{
  /* PATH to directory which contains the administrative area */
  const char *path;
  /* And the absolute form of the path. */
  const char *abspath;
  enum svn_wc__adm_access_type {
    /* SVN_WC__ADM_ACCESS_UNLOCKED indicates no lock is held allowing
       read-only access */
    svn_wc__adm_access_unlocked,
    /* SVN_WC__ADM_ACCESS_WRITE_LOCK indicates that a write lock is held
       allowing read-write access */
    svn_wc__adm_access_write_lock,
    /* SVN_WC__ADM_ACCESS_CLOSED indicates that the baton has been
       closed. */
    svn_wc__adm_access_closed
  } type;
  /* LOCK_EXISTS is set TRUE when the write lock exists */
  svn_boolean_t lock_exists;
  /* Handle to the administrative database. */
  svn_wc__db_t *db;
  /* Was the DB provided to us? If so, then we'll never close it. */
  svn_boolean_t db_provided;
  /* ENTRIES_HIDDEN is all cached entries including those in
     state deleted or state absent. It may be NULL. */
  apr_hash_t *entries_all;
  /* POOL is used to allocate cached items, they need to persist for the
     lifetime of this access baton */
  apr_pool_t *pool;
};

//In libsvn_wc/wc.h
/*** Context handling ***/
struct svn_wc_context_t
{
  /* The wc_db handle for this working copy. */
  svn_wc__db_t *db;
  /* The state pool for this context. */
  apr_pool_t *state_pool;
};

Thanks all!

Huihuang

2009-05-30

yellow.flying

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2357090
Received on 2009-05-30 12:45:13 CEST

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.