On May 14, 2009, at 1:09 AM, Lieven Govaerts wrote:
> Author: lgo
> Date: Wed May 13 23:09:20 2009
> New Revision: 37723
>
> Log:
> Fix issue in 'blame -g' where all chunks are not correctly
> identified as part of the same merged revision.
>
> Patch by: Alan Wood <Alan.Wood_at_clear.net.nz>
> me (small tweaks, removed some changes, unneeded
> to make this test pass).
>
> * subversion/libsvn_client/blame.c
> (normalize_blames): Correctly insert new 'blame chunks'
> in the chain or merged chain, instead of losing some
> chunks in the process.
>
> * subversion/tests/cmdline/blame_tess.py
> (test_list): Remove XFail wrapper from blame_output_after_merge
> test.
>
> Modified:
> trunk/subversion/libsvn_client/blame.c
> trunk/subversion/tests/cmdline/blame_tests.py
>
> Modified: trunk/subversion/libsvn_client/blame.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/blame.c?pathrev=37723&r1=37722&r2=37723
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_client/blame.c Wed May 13 14:13:08 2009
> (r37722)
> +++ trunk/subversion/libsvn_client/blame.c Wed May 13 23:09:20 2009
> (r37723)
> @@ -526,18 +526,18 @@ normalize_blames(struct blame_chain *cha
> assert(walk->start == walk_merged->start);
>
> if (walk->next->start < walk_merged->next->start)
> - {
> - struct blame *tmp = blame_create(chain_merged,
> walk_merged->next->rev,
> + { /* insert a new chunk in CHAIN_MERGED. */
Stylistic nit: we usually put comments on a separate line, so they
don't get lost.
>
> + struct blame *tmp = blame_create(chain_merged,
> walk_merged->rev,
> walk->next->start);
> - tmp->next = walk_merged->next->next;
> + tmp->next = walk_merged->next;
> walk_merged->next = tmp;
> }
>
> if (walk->next->start > walk_merged->next->start)
> - {
> - struct blame *tmp = blame_create(chain, walk->next->rev,
> + { /* insert a new chunk in CHAIN. */
Same.
>
> + struct blame *tmp = blame_create(chain, walk->rev,
> walk_merged->next->start);
> - tmp->next = walk->next->next;
> + tmp->next = walk->next;
> walk->next = tmp;
> }
> }
> ...
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2256221
Received on 2009-05-14 14:16:30 CEST