
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
44
|
Chapter 3: Guided Tour
$ svn diff --revision 3 rules.txt
Index: rules.txt
================================================================
===
--- rules.txt (revision 3)
+++ rules.txt (working copy)
@@ -1,4 +1,5 @@
Be kind to others
Freedom = Responsibility
Everything in moderation
-Chew with your mouth open
+Chew with your mouth closed
+Listen when others are speaking
$
Comparing repository to repository
If two revision numbers, separated by a colon, are passed via --revision (-r), then
the two revisions are directly compared.
$ svn diff --revision 2:3 rules.txt
Index: rules.txt
================================================================
===
--- rules.txt (revision 2)
+++ rules.txt (revision 3)
@@ -1,4 +1,4 @@
Be kind to others
-Freedom = Chocolate Ice Cream
+Freedom = Responsibility
Everything in moderation
Chew with your mouth closed
$
Not only can you use svn diff to compare files in your working copy to the reposi-
tory, but if you supply a URL argument, you can examine the differences between
items in the repository without even having a working copy. This is especially useful
if you wish to inspect changes in a file when you don’t have a working copy on your
local machine:
$ svn diff --revision 4:5 http://svn.red-bean.com/repos/example/trunk/text/rules.txt
...
$
svn cat
If you want to