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

Re: Fixing blame misalignment for >1m revs - some questions

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 16 Jun 2010 12:11:12 +0100

On Tue, 2010-06-15, Johan Corveleyn wrote:
> On Tue, Jun 15, 2010 at 4:36 PM, Philip Martin
> <philip.martin_at_wandisco.com> wrote:
> > Johan Corveleyn <jcorvel_at_gmail.com> writes:
> >
> >> 1) To do this, the blame_receiver callback needs to know the
> >> end_revnum. So I need to extend svn_client_blame_receiver3_t to
> >> include end_revnum as a parameter, right (so it can be passed to the
> >> receiver inside svn_client_blame5 (blame.c))?
> >
> > Not sure. Does end_revnum correspond to the end parameter passed to
> > svn_client_blame5?
>
> Only if the user specifies an end revnum explicitly. Otherwise the end
> parameter refers to HEAD or WORKING (depending on whether the target
> is a url or a path). So in general the caller doesn't know the exact
> end_revnum, and it's only retrieved in svn_client_blame5 (when it
> calls "svn_client__ra_session_from_path(&ra_session, &end_revnum,
> ...").
>
> > If so then it is probably the callers
> > responsibility to put it into receiver_baton, and it doesn't have to
> > appear in svn_client_blame_receiver3_t.
> >
> >> 2) Since svn_client_blame_receiver3_t was introduced in 1.7 (according
> >> to the comment), can I just change it, or do I still have to introduce
> >> a svn_client_blame_receiver4_t for backward compat?
> >
> > svn_client_blame_receiver3_t can be changed.
>
> Ok, I guess I'll have to do that then.

It seems sensible to pass the start and end revision numbers of the
requested blame range to this callback.

Note that the caller can request a blame where the "end" revision is the
"WORKING" pseudo-revision, so be careful not to confuse the reader when
documenting this new "end revision number" parameter which is a revision
number as determined from the repository and which will not include the
"WORKING" pseudo-revision. (Maybe we should also pass a parameter that
provides this information: "svn_boolean_t
range_includes_working_version"?)

- Julian
Received on 2010-06-16 13:11:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.