Using svn diff command
After making changes to a checked-out file, you can simply run
svn diff test.c
The -r
and @rev
are handy if you want to compare different versions of the file (older revisions). For example, to view the changes made between the two preceding revisions, use
svn diff -r PREV:HEAD test.c
caesar
Updated on July 13, 2022Comments
-
caesar almost 2 years
Since I'm a newbie to SVN, my question is a bit simple but before asking here, I did look at the official tutorial but the explanation in there did not give me any clue. So I hope I can find someone to simply them for me. Thanks in advance!
Here is my question: how do I use
svn diff
to see differences between a file in my repository and the file that I am currently working on? I mean, the file which is changed after the checkout but has not been added and committed yet.I've found the commands:
diff [-c M | -r N[:M]] [TARGET[@REV]...] diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] [PATH...] diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]
but I don't understand what
target[@rev], [--new=NEW-TGT[@NEWREV]] [PATH...]
etc. means.Assume I checked out the file to
/home/svn/myproject/test.c
and made some changes on it .Now I want to check the one which is on repository and this one. How do I do that? Thanks in advance!