[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: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Sat, 30 May 2009 09:00:31 -0500

On May 30, 2009, at 5:45 AM, HuiHuang wrote:

>
> >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.

I'd stay with the status quo for right now, with the expectation that
things will change over the course of the next few months. If you
introduce *new* wc APIs, which I don't think will be needed, then they
should use svn_wc_context_t.

>
> 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?

svn_wc_context_t is an opaque structure which contains a pointer to an
svn_wc__db_t. It's this database handle which contains the real
information used to interface with the working copy metadata. The
database will also handle locking, concurrency, and multiple directory
opening, only instead of keeping track of a collection of them, we
only need one. This is both easier, but it will also help as we move
toward a one-db-per-working copy paradigm.

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

'svn log subversion/include/svn_wc.h' :)

By the way, I'm happy to answer questions, as are a number of other
people, but sometimes you can get the information you are looking for
using a judicious combination of 'svn log' and 'svn praise'.
'praise' (or 'blame', if you prefer) gives line-by-line change
history, and our log messages usually contain a good rationale for the
accompanying change. Using these tools, you can mine the repository,
which is often much better than mining developers' heads.

> //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=2357120
Received on 2009-05-30 16:00:58 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.