Version Control with Subversion, 2nd Edition
by C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
Name
svn diff — Display the differences between two revisions or paths.
Synopsis
diff [-c M | -r N[:M]] [TARGET[@REV]...]
diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...]
diffOLD-URL[@OLDREV]NEW-URL[@NEWREV]
Description
Display the differences between two paths. You can use svn diff in the following ways:
Use just
svn diffto display local modifications in a working copy.Display the changes made to
TARGETs as they are seen inREVbetween two revisions.TARGETs may be all working copy paths or allURLs. IfTARGETs are working copy paths,Ndefaults toBASEandMto the working copy; ifTARGETs areURLs,Nmust be specified andMdefaults toHEAD. The-c Moption is equivalent to-r N:MwhereN = M-1. Using-c -Mdoes the reverse:-r M:NwhereN = M-1.Display the differences between
OLD-TGTas it was seen inOLDREVandNEW-TGTas it was seen inNEWREV.PATHs, if given, are relative toOLD-TGTandNEW-TGTand restrict the output to differences for those paths.OLD-TGTandNEW-TGTmay be working copy paths orURL[@REV].NEW-TGTdefaults toOLD-TGTif not specified.-r NmakesOLDREVdefault toN;-r N:MmakesOLDREVdefault toNandNEWREVdefault toM.
svn diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]
is shorthand for svn diff --old=OLD-URL[@OLDREV]
--new=NEW-URL[@NEWREV].
svn diff -r N:M URL is shorthand for
svn diff -r N:M --old=URL --new=URL.
svn diff [-r N[:M]] URL1[@N] URL2[@M] is
shorthand for svn diff [-r N[:M]] --old=URL1
--new=URL2.
If TARGET is a URL, then revs ...