Home > OS >  How to compare files between two svn revisions in VS code?
How to compare files between two svn revisions in VS code?

Time:10-19

I know you can code --diff file1 file2 to use the compare tool in VS code, but is it possible to compare two different svn revisions of a file?

I'd like to be able to combine svn diff -r 111:222 file1 with code --diff ....

Now svn diff would only give me a diff file so it's not enough to compare the whole files in VS code. I guess I could checkout both revisions of that file and code --diff those, but ideally I'd like to do this without the checkout since I'd do this frequently.

CodePudding user response:

I believe that the following command will help:

svn diff -r1000:1001 https://demo-server.visualsvn.com/asf/ --diff-cmd code -x "--wait --diff"

You may need to adjust the command line to your needs. Note that the URL is unnecessary if you run svn diff in a working copy. See the following pages for more information:

  • enter image description here

    PS I see the following warning in the command-line output, but I'm unsure of its meaning:

    Warning: 'L' is not in the list of known options, but still passed to Electron/Chromium.

  • Related