Greg Stein <gstein@lyra.org> writes:
> svn_error_t *
> svn_repos_walk_tree (svn_fs_root_t *root,
> const char *path, /* starting path locn */
> svn_repos_walk_func_t callback,
> void *cb_baton,
> apr_pool_t *pool);
>
> where you have:
>
> typedef svn_error_t * (*svn_repos_walk_func_t) (const char *path,
> void *baton,
> apr_pool_t *pool);
I agree with Greg. If we had a nice interface such as the one above,
then I wouldn't need to use dir_delta as a convenience, and things
would be easier to understand.
My code in mod_dav_svn looks like this right now. Not horrible, but
could be simpler:
if (dst_path) /* this was a 'switch' operation */
{
/* send a second embedded <S:resource-walk> tree that contains
the new vsn-rsc-urls for the switched dir. this walk
contains essentially nothing but <add> tags. */
svn_fs_root_t *zero_root;
svn_fs_revision_root(&zero_root, repos->fs, 0, resource->pool);
send_xml(&uc, "<S:resource-walk>" DEBUG_CR);
uc.resource_walk = TRUE;
/* Compare subtree DST_PATH within a pristine revision to
revision 0. This should result in nothing but 'add' calls
to the editor. */
serr = svn_repos_dir_delta(/* source is revision 0: */
zero_root, "", NULL,
/* target is 'switch' location: */
uc.rev_root, dst_path,
/* re-use the editor */
editor, &uc,
FALSE, /* no text deltas */
recurse,
TRUE, /* send entryprops */
FALSE, /* no copy history */
resource->pool);
send_xml(&uc, "</S:resource-walk>" DEBUG_CR);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 20 23:04:30 2002