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

Re: struct root_vtable_t documentation

From: David Glasser <glasser_at_davidglasser.net>
Date: Tue, 2 Jun 2009 18:51:41 -0700

These basically all correspond to svn_fs_* functions documented in svn_fs.h.

--dave

On Jun 2, 2009 6:45 PM, "Neels Janosch Hofmeyr" <neels_at_elego.de> wrote:

Hi all,

I just came across

struct root_vtable_t
in
subversion/libsvn_fs/fs-loader.h

and found it totally underdocumented. AFAICT, that's a pretty central
internal API, but reading it leaves many questions. An extract:

libsvn_fs/fs-loader.h
[[[
/* Some of these operations accept multiple root arguments. Since the
  roots may not all have the same vtable, we need a rule to determine
  which root's vtable is used. The rule is: if one of the roots is
  named "target", we use that root's vtable; otherwise, we use the
  first root argument's vtable. */
typedef struct root_vtable_t
{
 [...]
 /* Files */
 svn_error_t *(*file_length)(svn_filesize_t *length_p, svn_fs_root_t *root,
                             const char *path, apr_pool_t *pool);
 svn_error_t *(*file_checksum)(svn_checksum_t **checksum,
                               svn_checksum_kind_t kind, svn_fs_root_t
*root,
                               const char *path, apr_pool_t *pool);
 svn_error_t *(*file_contents)(svn_stream_t **contents,
                               svn_fs_root_t *root, const char *path,
                               apr_pool_t *pool);
 svn_error_t *(*make_file)(svn_fs_root_t *root, const char *path,
                           apr_pool_t *pool);
 svn_error_t *(*apply_textdelta)(svn_txdelta_window_handler_t *contents_p,
                                 void **contents_baton_p,
                                 svn_fs_root_t *root, const char *path,
                                 svn_checksum_t *base_checksum,
                                 svn_checksum_t *result_checksum,
                                 apr_pool_t *pool);
 [...]
]]]

It just says "Files", but I want to know what happens when I call, say,
apply_textdelta(), in detail. Where does the new data go? Is a new revision
tree node created? What Where How?

I need to start looking up implementations (pretty cumbersome for a vtable)
to find out what is going on.

Would someone in the know like to document these callbacks, or am I looking
in the wrong place or something?

Thanks
~Neels

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2358952

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2358954
Received on 2009-06-03 04:15:20 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.