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

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

From: Nathan Sharp <spamnps+subversion_at_phoenix-int.com>
Date: 2004-03-29 04:32:59 CEST

Unless I've gone completely bonkers I believe I've found an off-by-one
in the book. In the chapter on branching and merging (4), it talks
about how to merge a branch that already had been merged. It has you
look up your previous merge in the log file and see that you did
r341:405. Then, it says you should therefore do r406:HEAD to get the
rest of the branch. This will, however, leave out any changes made in
version 406 itself. The correct thing to use would be r405:HEAD.

$ echo "r26 line" >>bla.txt
$ svn commit -m "added a line for r26"
Sending bla.txt
Transmitting file data .
Committed revision 26.
$ echo "r27 line" >>bla.txt
$ svn commit -m "added a line for r27"
Sending bla.txt
Transmitting file data .
Committed revision 27.

... more commits

$ svn diff -r25:26
Index: bla.txt
===================================================================
--- bla.txt (revision 25)
+++ bla.txt (revision 26)
@@ -1,2 +1,3 @@
 new file
 
+r26 line

$ svn diff -r27:HEAD
Index: bla.txt
===================================================================
--- bla.txt (revision 27)
+++ bla.txt (revision 29)
@@ -2,3 +2,5 @@
 
 r26 line
 r27 line
+more stuff
+another commit

Notice that the r27 line is not included to be added in the patch.

  Nathan

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