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

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

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 28 Jun 2012 19:26:42 +0200

> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: donderdag 28 juni 2012 19:16
> To: dev_at_subversion.apache.org
> Subject: Re: svn commit: r1355012 - in /subversion/trunk/subversion:
> libsvn_wc/conflicts.c libsvn_wc/conflicts.h tests/libsvn_wc/conflict-data-
> test.c
>
> On Thu, Jun 28, 2012 at 9:49 AM, <rhuijben_at_apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/libsvn_wc/conflicts.c Thu Jun 28
13:49:35
> 2012
> >...
> > +static svn_error_t *
> > +conflict__get_conflict(svn_skel_t **conflict,
> > +                       svn_skel_t *conflict_skel,
> > +                       const char *conflict_type)
> > +{
> > +  svn_skel_t *c;
> > +  apr_size_t len;
> > +  SVN_ERR_ASSERT(conflict_skel
> > +                 && conflict_skel->children
> > +                 && conflict_skel->children->next
> > +                 && !conflict_skel->children->next->is_atom);
> > +
> > +  len = strlen(conflict_type);
> > +
> > +  for(c = conflict_skel->children->next->children;
> > +      c;
> > +      c = c->next)
> > +    {
> > +      if (c->children->is_atom
> > +          && c->children->len == len
> > +          && memcmp(c->children->data, conflict_type, len) == 0)
>
> Please use svn_skel__matches_atom() for clarity.

Thanks, didn't know about that function.

>
> >...
> > +  markers = svn_skel__make_empty_list(result_pool);
> > +
> > +  if (marker_abspath)
> > +    {
> > +      const char *marker_relpath;
> > +      SVN_ERR(svn_wc__db_to_relpath(&marker_relpath, db,
> wri_abspath,
> > +                                    marker_abspath,
> > +                                    result_pool, scratch_pool));
> > +
> > +      svn_skel__prepend_str(marker_relpath, markers, result_pool);
> > +    }
> > +  else
> > +    svn_skel__prepend(svn_skel__make_empty_list(result_pool),
> markers);
> > +
> > +  svn_skel__prepend(markers, prop_conflict);
>
> If there is no MARKER_ABSPATH, then you end up with (()) rather than just
> ().

This is documented as a special allowed value, but my next patch will remove
it anyway (as it keeps the property unneeded hard to fill this value
directly). This will add an empty list and add the item right before
installing in the db.

Thanks,
        Bert
>
> >...
>
> Cheers,
> -g
Received on 2012-06-28 19:27:48 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.