subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arwin Arni Nandagopal <>
Subject Re: command line syntax for svn diff
Date Sat, 28 Apr 2018 06:39:24 GMT
There  are revision keywords like HEAD which references the latest revision and PREV which
references the last changed revision of the target. E.g: SVN diff -rHEAD:PREV target.file
will show the changes between the last changed revision for that file and the latest revision,
which is effectively the change introduced by that last revision.


From: Bo Berglund <>
Sent: Saturday, April 28, 2018 10:53:35 AM
Subject: command line syntax for svn diff

I want to examine the difference between two file revisions, one being
the file in the working copy and the other the same file as the
previous committed revision of that same file.
The diff should be sent to WinMerge for display.

In the WinMerge docs (
they suggest to use this command line:
svn diff --diff-cmd "<path to WinMerge executable>" -x "-dl -dr" <file
to check>

But when I try this in a WC on a file that is part of the project
nothing at all happens:

svn diff --diff-cmd "C:\Programs\WinMerge\WinMergeU.exe" -x "-dl -dr"

I suspect that the svn diff needs something more to work correctly,
the above command might only work with *local* uncommitted changes?

In SVNBook is shown the diff command as:
svn -diff -r 2:3 <filename>
where 2 and 3 are the revisions to compare.

But my problem is that the revisions where the file actually changed
last is not known, so how can I put the correct number into the

There is also the --change parameter to svn diff, but the same problem
reappears: how to find out the revision where this particular file
changed in the past?

I am running Svn 1.9.7 command line client on Windows 7 X64.
I cannot install Tortoise because my Windows Explorer plug-in handler
is already filled to capacity...

Bo Berglund
Developer in Sweden

View raw message