Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: [PATCH] Fix for blame -g incorrect revisions

subversion
Discussion topic

Back to topic list

Re: [PATCH] Fix for blame -g incorrect revisions

Author Lieven Govaerts <svnlgo at mobsol dot be>
Full name Lieven Govaerts <svnlgo at mobsol dot be>
Date 2009-05-13 10:34:52 PDT
Message Hi Alan,

I have a few questions on your patch (inline).

On 04/23/2009 11:11 AM, Alan Wood wrote:
> Hi,
>
> Here is an updated version of the patch in which I have reverted two lines that I
> changed as I have been unable to convince myself that the change was necessary.
>
> Can't actually come up with a test case that uses the lines so I will leave them alone.
>

> Index: subversion/libsvn_cl​ient/blame.c
> ====================​====================​====================​=======
> --- subversion/libsvn_cl​ient/blame.c (revision 37376)
> +++ subversion/libsvn_cl​ient/blame.c (working copy)
> @@ -526,18 +526,18 @@
> 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,
> + { /* split walk_merged in two so start points the same */
> + 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,
> + { /* split walk in two so start points the 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;
> }
> }
> @@ -781,7 +781,7 @@
> sb->data, FALSE, iterpool));
> else
> SVN_ERR(receiver(rec​eiver_baton, line_no, SVN_INVALID_REVNUM,
> - NULL, SVN_INVALID_REVNUM, NULL, NULL,
> + NULL, merged_rev, merged_rev_props, merged_path,

Why is this chunk needed?

> sb->data, TRUE, iterpool));
> }
> if (eof) break;
> Index: subversion/svn/blame-cmd.c
> ====================​====================​====================​=======
> --- subversion/svn/blame-cmd.c (revision 37376)
> +++ subversion/svn/blame-cmd.c (working copy)
> @@ -178,8 +178,9 @@
> revision which put the line in its current state, so we use the
> earliest revision. If we ever switch to a backward blame algorithm,
> we may need to adjust this. */
> - if (merged_revision < revision)
> - {
> + if (SVN_IS_VALID_REVNUM​(merged_revision) &&
> + (!SVN_IS_VALID_REVNUM(revision) || merged_revision < revision))
> + {

Same question here.

The test case you provided - committed in r37719 - doesn't need those
two changes to pass.

Lieven

« Previous message in topic | 5 of 15 | Next message in topic »

Messages

Show all messages in topic

[PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-04-20 02:33:25 PDT
     Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-04-23 02:11:41 PDT
         Re: [PATCH] Fix for blame -g incorrect revisions Lieven Govaerts <svnlgo at mobsol dot be> Lieven Govaerts <svnlgo at mobsol dot be> 2009-05-04 03:22:46 PDT
             Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-05-04 13:18:53 PDT
         Re: [PATCH] Fix for blame -g incorrect revisions Lieven Govaerts <svnlgo at mobsol dot be> Lieven Govaerts <svnlgo at mobsol dot be> 2009-05-13 10:34:52 PDT
             Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-05-13 15:04:09 PDT
                 Re: [PATCH] Fix for blame -g incorrect revisions Lieven Govaerts <svnlgo at mobsol dot be> Lieven Govaerts <svnlgo at mobsol dot be> 2009-05-13 23:19:58 PDT
                     Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-05-14 00:56:29 PDT
                     Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-05-14 01:50:24 PDT
                         Re: [PATCH] Fix for blame -g incorrect revisions gavinbaumanis Gavin Baumanis 2009-05-25 03:18:17 PDT
                             Re: [PATCH] Fix for blame -g incorrect revisions Lieven Govaerts <svnlgo at mobsol dot be> Lieven Govaerts <svnlgo at mobsol dot be> 2009-05-25 07:01:26 PDT
     Re: [PATCH] Fix for blame -g incorrect revisions alwood Alan Wood 2009-04-24 15:17:56 PDT
         Re: [PATCH] Fix for blame -g incorrect revisions gavinbaumanis Gavin Baumanis 2009-05-01 04:34:21 PDT
             RE: Re: [PATCH] Fix for blame -g incorrect revisions webpost at tigris dot org webpost at tigris dot org 2009-05-01 13:56:49 PDT
     RE: [PATCH] Fix for blame -g incorrect revisions webpost at tigris dot org webpost at tigris dot org 2009-04-27 03:21:56 PDT
Messages per page: