How do I output the difference between two specific revisions in Subversion?

SvnDiff

Svn Problem Overview


I'm using Subversion via the Linux command line interface.

I want to see the difference between revision 11390 and 8979 of a specific file called fSupplierModel.php in my terminal. How can I do that?

Svn Solutions


Solution 1 - Svn

See svn diff in the manual:

svn diff -r 8979:11390 http://svn.collab.net/repos/svn/trunk/fSupplierModel.php

Solution 2 - Svn

To compare entire revisions, it's simply:

svn diff -r 8979:11390


If you want to compare the last committed state against your currently saved working files, you can use convenience keywords:

svn diff -r PREV:HEAD

(Note, without anything specified afterwards, all files in the specified revisions are compared.)


You can compare a specific file if you add the file path afterwards:

svn diff -r 8979:HEAD /path/to/my/file.php

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionallen213View Question on Stackoverflow
Solution 1 - SvnD'Arcy RittichView Answer on Stackoverflow
Solution 2 - SvnahnbizcadView Answer on Stackoverflow