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

Re: Does svn_fs_change_merge_info() accept NULL as mergeinhash

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-04-05 05:32:57 CEST

On Thu, 05 Apr 2007, Kouhei Sutou wrote:

> Hi,
>
> svn_fs_change_merge_info()'s document says:
>
> - @a mergeinhash is the new value of the mergeinfo for PATH, or NULL if
> the merge info for that path should be removed altogether.
>
> But the implementation of fsfs,
> subversion/libsvn_fs_fs/tree.c:fs_change_merge_info(), doen't accept NULL.
> Which is correct?

We need to be able to handle the case where a path has all its merge
info removed. I think this should be represented by a hash with paths
(keys) mapping to empty rangelists (apr_array_header_t *'s containing
zero svn_merge_range_t *'s).

We also need to handle the case where all merge info for a path has
been removed.

I think that svn_fs_change_merge_info() should accept NULL to handle
this latter case, since apr_hash_t *'s don't handle NULL values
(setting a NULL value equates to removing the mapping entirely).

  • application/pgp-signature attachment: stored
Received on Thu Apr 5 05:33:26 2007

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.