[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: command line syntax for svn diff

From: Bo Berglund <bo.berglund_at_gmail.com>
Date: Sat, 28 Apr 2018 09:39:35 +0200

On Sat, 28 Apr 2018 06:39:24 +0000, Arwin Arni Nandagopal
<arwin_at_collab.net> wrote:

>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.
>

Thanks! That made a good way forward!

I did this on the command line:
svn diff -r HEAD:PREV espconfig.cpp

And now I get output which is a regular (humanly unreadable) diff:
Index: espconfig.cpp
===================================================================
--- espconfig.cpp (revision 2446)
+++ espconfig.cpp (revision 2434)
@@ -175,7 +175,6 @@
  * A<ip address><ETX> sets IP address as X.Y.Z.W format
  * B<baudrate><ETX> sets the serial port baud rate
  * C<channelnumber><ETX> sets the wifi channel number in AP
mode (0-13 where 0 means no setting)
- * F<value><ETX> sets the STA mode IP address
fixed state
  * H<hidden><ETX> sets if AP mode ssid shall be hidden (1)
or not (0)
  * L<ETX> load config into CnfTmp
  * M<value><ETX> sets the WiFi mode
@@ -187,7 +186,6 @@
  * a<ETX> gets IP address
  * b<ETX> gets the serial port baud rate
  * c<ETX> gets the AP mode channel number (0..13)
- * f<ETX> gets the STA mode
fixed address setting (0..1)
  * h<ETX> gets the AP mode ssid hidden state (0/1)
  * i<ETX> gets the WiFi MAC address
  * m<ETX> gets the WiFi mode
.... etc with + and - indicators....

But what I would like is to get this loaded into WinMerge so I can
examine side by side the code changes in context.

And of course the example from the WinMerge docs does not work yet...
I modified it thus:

svn diff -r HEAD:PREV --diff-cmd "C:\Programs\WinMerge\WinMergeU.exe"
-x "-dl -dr" espconfig.cpp

I have no idea what the parameters "-dl -dr" axtually do, though.

Question:
---------
Since I am new to SVN but it has been around for like 15 years I
expected this diff use to be pretty common but I find little info when
I google.
Do people not use diffs into sensible GUI display programs like
WinMerge when using SVN?
Or is GUI equivalent to saying TortoiseSVN?
(which I cannot install for reasons explained in my start post).

-- 
Bo Berglund
Developer in Sweden
Received on 2018-04-28 09:39:57 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.