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

Re: r18810: svn_client_diff_peg3() with unspecified peg revision

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-03-13 13:08:42 CET

Hi Julian,

I hope to have some time to reply to your larger email later on tonight,
but for the moment...

On Mon, Mar 13, 2006 at 11:20:21AM +0000, Julian Foad wrote:
> Why do you want that new meaning?
>
> I believe it should be an error to request a pegged diff with an
> unspecified peg.
>

Well, I think you're right in pointing out that 'pegged diff' is a
particularly bad term; it's really 'single-target (with perhaps-optional
peg revision)' vs 'two-target'. So we're talking about the first case.

Our other client functions allow a peg-revision to be optional; I had
assumed that the lack of documentation on this for the single-target diff
case was an oversight rather than a deliberate omission. Though now
I actually double-check, I see that in the 'svn diff' case, the caller
provides a default.

> >Fix a bug whereby svn_client_diff3_peg() and
> >svn_client_diff_summarize_peg() would return a bogus error when called
> >with an unspecified peg-revision and two 'local' revisions (e.g. BASE
> >and WORKING), matching the behaviour of our other client functions in
> >allowing the peg-revision to be optional.
>
> As for matching other functions, I don't think they behave like this;
> instead, if the peg is unspecified, they choose a default peg and use it.
>

You're right (typically svn_opt_revision_head for URLs and
svn_opt_revision_working for WC targets). So what this change should
possibly have been described as is "allow svn_opt_revision_unspecified
to be used to imply a peg revision of svn_opt_revision_working for wc-wc
diffs", although that's not the way it's implemented.

> What was the circumstance that caused it to be called in this way?

Ah, none, from our codebase anyway. Bear in mind that providing an
unspecified peg-revision has always worked (except in the BASE:WORKING
case) and so I don't think we can necessarily define it as invalid ex
post facto, though I'm no longer sure that my [documentation] changes
were the right thing to do.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 13 13:10:09 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.