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

Re: Minor off-by-one in the Book (merging -r406:HEAD should be r405:HEAD)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-05-31 22:47:41 CEST

Nathan Sharp wrote:
> I still would argue that it is easy enough for a newbie to commit an
> off-by-one error with regards to revision numbers that it is worthwhile
> to be absolutely correct in the documentation, even if the less accurate
> value still "works".

In the particular example that you are commenting on, where r406 is the first merge, I don't think that the given "r406:something" is "less accurate" than "r405:" would be, but rather is the more correct alternative. When performing the second merge, the first merge is not one of the changes that you want to include in the second merge. If, however, there is or were to be an example of merging two contiguous sets of historical revisions, then of course "rX:Y" and "rY:Z" would be necessary.

I agree that it is easy for a newbie to commit an off-by-one error with regards to revision numbers because of the confusion between "the changes made between revision X and revision Y" and "the changes that created revision X, up to and including the changes that created revision Y". Both of these meanings are expressed by the same syntax "rX:Y" in different commands. The former meaning is how "diff" and "merge" interpret their argument, and the latter is how "log" and "blame" behave. Perhaps we should use different syntaxes for the different meanings (such as "rX-Y" for the former and "rX:Y" for the latter).

I would argue that this semantic distinction needs to be explained clearly in the book, early on. I haven't checked recently to see whether it is explained adequately. If you would like to check and write a patch, that would be grand.

- Julian

> Julian Foad wrote:
>
>> You are right that any changes made in r406 will not be included in
>> the second merge, but in this particular example r406 was the merge of
>> branch changes into the trunk, so r406 did not make any changes to the
>> branch itself, so it is perfectly OK.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 31 22:47:47 2004

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.