[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 11:09:17 +0200

On Sat, 28 Apr 2018 07:57:16 +0000, Arwin Arni Nandagopal
<arwin_at_collab.net> wrote:

>You'll have to see the documentation for that tool (WinMerge in your case).

THanks,
I ended up writing a batch file in a folder on path using svn cat to
get a temp copy of the previous revision to compare against:

@ECHO OFF
SET WINMERGE="C:\Programs\WinMerge\WinMergeU.exe"
SET INFILE=%1
IF EXIST %INFILE% GOTO proceed
GOTO exitnofile

:proceed
SET TMPFILE=%INFILE%.temp
svn cat -r PREV %INFILE% > %TMPFILE%
%WINMERGE% /e /x /u /dl "Current file" /dr "Previous revision"
%INFILE% %TMPFILE%
REM Cleanup
DEL %TMPFILE%

REM ----- Various exit modes ------
GOTO exitbat
:exitnofile
ECHO File not found so exiting
GOTO exitbat

:exitbat
REM Exit batch file

This seems to work as I want it to for now.
It will download the previous revision into a temp file in the current
dir, then invoke WinMerge with the original and the temp files as
arguments. Finally when closing it deletes the temp file.

Seems to work OK so far.

Thanks for your help, I did not know of the HEAD and PREV labels for
the revisions....

-- 
Bo Berglund
Developer in Sweden
Received on 2018-04-28 11:09:39 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.