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

Re: svn commit: r16735 - in trunk/subversion: libsvn_subr libsvn_wc

From: David James <james82_at_gmail.com>
Date: 2005-10-16 07:45:13 CEST

On 10/16/05, Kouhei Sutou <kou@cozmixng.org> wrote:
> Hi,
>
> In <200510151724.j9FHO4J08094@morbius.ch.collab.net>
>
> > Author: djames
> > New Revision: 16735
>
> > --- trunk/subversion/libsvn_subr/constructors.c (original)
> > +++ trunk/subversion/libsvn_subr/constructors.c Sat Oct 15 12:24:04 2005
>
> > +svn_client_commit_item2_t *
> > +svn_client_commit_item2_dup (const svn_client_commit_item2_t *item,
> > + apr_pool_t *pool)
> > +{
> > + svn_client_commit_item2_t *new_item = apr_palloc (pool, sizeof (*new_item));
> > +
> > + *new_item = *item;
> > +
> > + if (new_item->path)
>
> if (new_item->kind && new_item->path)
>
> We need to check new_item->kind value is svn_node_none or
> not.
Really? I did not know this. Why?

> Or we initialize item->path as NULL if item->path is
> not available.
We copy *new_item = *item, so new_item->path will be NULL if item->path is NULL.

> > + new_item->path = apr_pstrdup (pool, new_item->path);
> > +
> > + if (new_item->url)
> > + new_item->url = apr_pstrdup (pool, new_item->url);
>
> if (new_item->copyfrom_url)
> new_item->copyfrom_url = apr_pstrdup (pool, new_item->copyfrom_url);
>
> We need to copy new_item->copyfrom_url.
Oops. Yes, I'll add this.

> > +
> > + if (new_item->wcprop_changes)
>
> I think we need to check new_item->wcprop_changes is
> available or not. But I don't know the way...
If new_item->wcprop_changes is not available, it would be NULL, right?

> Can we initialize item->wcprop_changes as NULL?
We copy *new_item = *item, so new_item->wcprop_changes will be NULL if
item->wcprop_changes is NULL.

--
David James -- http://www.cs.toronto.edu/~james
Received on Sun Oct 16 07:45:54 2005

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.