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

RE: svn commit: r1355692 - in /subversion/trunk/subversion: libsvn_wc/conflicts.c libsvn_wc/conflicts.h libsvn_wc/wc_db.c tests/libsvn_wc/conflict-data-test.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sat, 30 Jun 2012 14:20:35 +0200

Const would be nice, but would give a compile error in all these locations.

conflict__get_conflict() is a static function that return a non const skel
to allow editing/extending the skel.

 

I'm not sure where to bend the rules on const, but with my compiler not
giving all the same warnings as gcc I try to keep on the safe side.

 

Creating a helper function for this 3* block looks like overkill. Especially
since this code is unstable at this time. (Although I would expect this
specific part to be pretty stable)

 

                Bert

 

From: Greg Stein [mailto:gstein_at_gmail.com]
Sent: zaterdag 30 juni 2012 13:12
To: dev_at_subversion.apache.org
Subject: Re: svn commit: r1355692 - in /subversion/trunk/subversion:
libsvn_wc/conflicts.c libsvn_wc/conflicts.h libsvn_wc/wc_db.c
tests/libsvn_wc/conflict-data-test.c

 

On Jun 30, 2012 7:00 AM, <rhuijben_at_apache.org> wrote:
>...
> @@ -627,6 +630,33 @@ svn_wc__conflict_read_info(svn_wc_operat
> else if (locations)
> *locations = NULL;
>
> + if (text_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_TEXT));
> +
> + *text_conflicted = (c_skel != NULL);
> + }
> +
> + if (prop_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_PROP));
> +
> + *prop_conflicted = (c_skel != NULL);
> + }
> +
> + if (tree_conflicted)
> + {
> + svn_skel_t *c_skel;
> + SVN_ERR(conflict__get_conflict(&c_skel, conflict_skel,
> + SVN_WC__CONFLICT_KIND_TREE));
> +
> + *tree_conflicted = (c_skel != NULL);
> + }

Seriously? Maybe I need a macro to ease my reviews:

const!

>...

(and to repeat my request for blank lines between declarations and code;
those are separate semantic items, and should have visible separation)

Cheers,
-g
Received on 2012-06-30 14:21:19 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.