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

Re: svn commit: rev 1886 - trunk/subversion/libsvn_fs

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-05-14 09:10:08 CEST

On Mon, May 06, 2002 at 01:27:58PM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_fs/fs_skels.c Mon May 6 13:27:57 2002
>...
> +is_valid_node_revision_header_skel (skel_t *skel, skel_t **kind_p)
> +{
> + if (svn_fs__list_length (skel) >= 2)
> + {
> + if (skel->children->is_atom && skel->children->next->is_atom)
> + {
> + skel_t *option = skel->children->next->next;
> +
> + for ( ; option; option = option->next)
> + {
> + if (! ((svn_fs__list_length (option) == 3)
> + && svn_fs__matches_atom (option->children, "copy")
> + && option->children->next->is_atom
> + && option->children->next->next->is_atom))
> + return 0;
> + }

This loop does not match the contenst of libsvn_fs/structure. It only
defines an optional "copy" item, not a whole list of options. Further, the
parse function and the related structure does not consider the multiple
options embodied by the code in this function.

>...
> +svn_error_t *
> +svn_fs__parse_entries_skel (apr_hash_t **entries_p,
>...
> + /* Get the entry's name and ID. */
> + name = apr_pstrndup (pool, elt->children->data, elt->children->len);
> + id = svn_fs_parse_id (elt->children->next->data,
> + elt->children->next->len, pool);
> +
> + /* Add the entry to the hash. */
> + apr_hash_set (entries, name, APR_HASH_KEY_STRING, (void *) id);

elt->children->len can be used rather than APR_HAS_KEY_STRING.

>... (in fs_skels.h) ...

> +svn_error_t *
> +svn_fs__unparse_node_revision_skel (skel_t **skel_p,
> + svn_fs__node_revision_t *rep,

should be 'const'

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 14 09:08:27 2002

This is an archived mail posted to the Subversion Dev mailing list.