Search code examples
svncmdtortoisesvndiff

TortoiseSVN command line to diff 2 svn files with different names and version


I created a small program in C# to diff a big amount of files from svn with a user friendly window. You just give the svn Version of the original file and of the new version and a list of files to diff with full path. What happens behind is just a cmd call like this:

"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:diff /ignoreprops /startrev:3 /endrev:770 /path:"x:\myPath\myFile.c"

see Automating TortoiseSVN

But now I would like to have the possibility to diff 2 svn files with different name. The content is pretty much the same but the name was slightly changed, something like from myFile.c to my_File.c. I know it looks something like:

"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:diff /ignoreprops /path:"x:\myPath\myFile.c" /path2:"x:\myPath\my_File.c"

but I cannot figure out how to add svn version to it, I have tried this without success:

"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:diff /ignoreprops /startrev:3 /endrev:770 /path:"x:\myPath\myFile.c" /path2:"x:\myPath\my_File.c"

Does anyone know if it is possible or maybe anotherway to do it?


Solution

  • Use showcompare command:

    "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe"
        /command:showcompare
        /ignoreprops
        /url1:"x:\myPath\myFile.c"
        /url2:"x:\myPath\my_File.c"
        /revision1:3
        /revision2:770