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

r18810: svn_client_diff_peg3() with unspecified peg revision

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-03-13 12:20:21 CET

Malcolm,

This change included documenting that

   svn_client_diff_peg3(path, peg=unspecified, rev1, rev2)

will mean

   svn_client_diff3(path, rev1, path, rev2)

However, I think that's confusing two different semantics. Please read my
"Pegged diffs" reply that I have just sent to an earlier thread, first, and see
if you agree with my analysis of what these concepts and terms mean.

What we call a "pegged" diff means comparing the two states (at rev1 and rev2)
of the OBJECT found at path@peg. The non-pegged diff compares two paths
(identical in this case) that may not represent the same object, and so will
give different results if the object has been moved.

Why do you want that new meaning? What was the circumstance that caused it to
be called in this way?

I believe it should be an error to request a pegged diff with an unspecified peg.

> ------------------------------------------------------------------------
> r18810 | malcolm | 2006-03-10 12:41:18 +0000 (Fri, 10 Mar 2006) | 21 lines
>
> 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.

> * subversion/libsvn_client/diff.c
> (check_paths): Determine if the diff is pegged by looking at the
> diff parameters' peg-revision field rather than by requiring the
> caller to tell us. Document the behaviour of the function for
> pegged diffs.
> (do_diff, do_diff_summarize): Remove the pegged argument (only used
> in the calls to check_paths()), and update calls to check_paths().
> (svn_client_diff3, svn_client_diff_peg3): Update calls to do_diff().
> (svn_client_diff_summarize, svn_client_diff_summarize_peg): Update
> calls to do_diff_summarize().
>
> * subversion/include/svn_client.h
> (svn_client_diff_peg3, svn_client_diff_summarize_peg): Document the
> behaviour of these functions with an unspecified peg-revision.
>

- Julian

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