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

Re: svn commit: r28752 - in branches/reintegrate/subversion: libsvn_fs_base tests/libsvn_fs

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: Fri, 4 Jan 2008 17:59:48 -0800

Awesome, C-Mike!

On Fri, 04 Jan 2008, cmpilato_at_tigris.org wrote:
...
> --- branches/reintegrate/subversion/libsvn_fs_base/dag.c (original)
> +++ branches/reintegrate/subversion/libsvn_fs_base/dag.c Fri Jan 4 13:36:51 2008
...
> +svn_error_t *svn_fs_base__dag_set_has_mergeinfo(dag_node_t *node,
> + svn_boolean_t has_mergeinfo,
> + svn_boolean_t *had_mergeinfo,
> + const char *txn_id,
> + trail_t *trail,
> + apr_pool_t *pool)
> +{
> + node_revision_t *node_rev;
> + svn_fs_t *fs = svn_fs_base__dag_get_fs(node);
> + const svn_fs_id_t *id = svn_fs_base__dag_get_id(node);
> +
> + if (! svn_fs_base__dag_check_mutable(node, txn_id))
> + return svn_error_createf(SVN_ERR_FS_NOT_MUTABLE, NULL,
> + _("Attempted merge tracking info change on "
> + "immutable node"));
> +
> + SVN_ERR(svn_fs_bdb__get_node_revision(&node_rev, fs, id, trail, pool));
> + *had_mergeinfo = node_rev->has_mergeinfo;
> +
> + /* Are we changing the node? */
> + if ((! has_mergeinfo) != (! *had_mergeinfo))
...

I find this expression really difficult to grok at first glance. Is there
a simpler way to do it (without all the negation)?

  • application/pgp-signature attachment: stored
Received on 2008-01-05 03:00:04 CET

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.