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

Re: [PATCH] Issue #2287 - Make svn_client_log() take a peg revision

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-09-03 12:35:16 CEST

S.Ramaswamy wrote:
>>
>>>>>+ if (start->kind == svn_opt_revision_number &&
>>>>>+ end->kind == svn_opt_revision_number)
>>>>>+ revision = (start->value.number > end->value.number) ? *start : *end;
>>>>>+ else
>>>>>+ revision.kind = svn_opt_revision_unspecified;
>>>>>
>>>>>+ SVN_ERR (svn_client__ra_session_from_path (&ra_session, &rev,
>>>>>+ &url_p, path,
>>>>>+ peg_revision, &revision, ctx,
>>>>>+ pool));
>>>>>+
>>>>
>>>>Please could you explain this change. I don't understand why something special
>>>>is happening if both the start and end revisions are specified as numbers
>>>>rather than, for example, dates. And I don't really understand _what_ special
>>>>behaviour is happening in that case.
>>
>>I'd still like you to explain this part of the patch if you would, please.
>
>>From the doc string for svn_client__ra_session_from_path(), revision is,
> "a desired revision REVISION, create an RA connection to that object as it
> exists in that revision, following copy history if necessary."

I'm not sure what it means to create a connection to a particular revision of
an object. In terms of generating the log, is it necessary to connect to a
particular revision, or will any revision work?

If you connect to some particular revision such as the "start" or "end"
revision of the log, will that make the log operation more efficient than if
you had connected to "head" or a random revision? That's my guess of the day.

> I meant to get a ra_session to the youngest revision of the object, before
> using the operating revisions on that.

Huh? The youngest revision of an object is always given by
svn_opt_revision_head. I suppose you meant the younger of the two specified
endpoints for the log, "start" and "end". Yes? But your code only does that
in certain cases (namely when both are specified as a number). Therefore
either your code is incomplete, or it is not necessary to connect to the
younger of the two revisions. If it is not necessary, then why do you do it in
some cases? Because it makes the log operation more efficient? If that's the
case, that's fine, but it's not obvious so a comment in the code would be
useful. If that's not the case then what is the reason for it?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 3 12:36:14 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.