svntortoisesvn

SVN diff between a particular revision of a file and and external file


I wanted to get a diff output between a particular revision of a versioned file and an external file.

I understand this is possible svn diff --old "path/to/versioned/file1"@1234 --new "path/to/versioned/file1"@1235 find the differences between revision 1234 and 1235 of the file.

And also this svn diff --old "path/to/versioned/file1" --new "externalpath/to/external/folder/file1" which finds the difference between the latest versioned file and an external file which is not versioned with SVN.

What I wanted was to compare a particular revision against and external file which is not versioned. Something like this:

svn diff --old "path/to/versioned/file1"@1234 --new "externalpath/to/external/folder/file1"

Edit:

The issue is that that command does not work.

Error text:

svn: E155007: 'externalpath/to/external/folder/file1' is not a working copy

FYI: I am using TortoiseSVN as the SVN client


Solution

  • @friedrich's workaround does work well for this particular query.

    One alternative workaround I used which can prevent the need to update the database is to cat the required revision to a file using the command svn cat "path/to/versioned/file1"@1234 > file1234 and diff-ing with that temporary file. The entire one line command looks as such:

    svn cat "path/to/versioned/file1"@1234 > file1234 & svn diff --old file1234 --new externalpath/to/external/folder/file1