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

Re: [PATCH] svn_client_diff_summarize() reports 'normal' if properties were changed

From: Martin Hauner <martin.hauner_at_gmx.net>
Date: 2006-04-24 21:52:07 CEST

Stefan Küng wrote:
> Hi,
>
> The new API in 1.4 svn_client_diff_summarize() returns always
> svn_client_diff_summarize_kind_normal as the diff->summarize_kind member
> if there were property changes (if diff->prop_changed is true). And this
> even if there actually were changes in the text part of a file.
> The attached patch fixes this issue.

The ensure_summarize feels a bit strange anyway. What about removing
the sum_kind parameter from it and simply setting the kind to normal.

Any caller of ensure_summarize would then overwrite the kind if required:

ib->summarize->summarize_kind = svn_client_diff_summarize_kind_modified;

change_prop wouldn't overwrite it. To bad it is such a long line.. ;)

> Index: subversion/libsvn_client/repos_diff_summarize.c
> ===================================================================
> --- subversion/libsvn_client/repos_diff_summarize.c (revision 19446)
> +++ subversion/libsvn_client/repos_diff_summarize.c (working copy)
> @@ -89,8 +89,12 @@
> {
> svn_client_diff_summarize_t *sum;
> if (ib->summarize)
> + {
> + if (ib->summarize == svn_client_diff_summarize_kind_normal)
> + ib->summarize = sum_kind;

This looks strange here, shouldn't it be something like

    if (sum->summarize_kind != svn_client_diff_summarize_kind_normal)
       sum->summarize_kind = sum_kind;

    and after the alloc?

> sum = apr_pcalloc(ib->item_pool, sizeof(*sum));
>
> sum->node_kind = ib->node_kind;

-- 
Martin
Subcommander, http://subcommander.tigris.org
a cross platform Win32/Unix/MacOSX subversion GUI client & diff/merge tool.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 24 21:54:46 2006

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.