@SET DBVER=33a
@SET DBPRV=33
@SET DBPRVPATH=z:\Archief\FACILITOR\2017\03\DB33\FCLT33.sql

IF EXIST %DBPRVPATH% GOTO START
ECHO %DBPRVPATH% niet gevonden
PAUSE
GOTO EINDE

:START
@echo off
REM Usage: %0 [revision]
REM Internal only
REM Let op: je hebt SVN.EXE nodig die bijvoorbeeld meekomt als je bij TortoiseSVN
REM         er voor kiest 'command line client tools' ook te installeren (default uit)
REM

SET PAD=http://facws001:8080/svn/Facilitor/Database/branches/DB33

SET SVNTOOLS=z:\Project\FACILITOR\Tools\MAKTOOLS\SlikSvn\bin

IF x%1==x GOTO getrev
SET REVISION=%1
GOTO gotrev

:getrev
FOR /F "tokens=2 skip=4" %%G IN ('%SVNTOOLS%\svn info %PAD% --revision HEAD') DO ^
IF NOT DEFINED REVISION SET REVISION=%%G

:gotrev
@TITLE Getting r%REVISION%
SET FCLTMP=%TEMP%\FACILITOR_SVN_T_%REVISION%

%SVNTOOLS%\svn export -r %REVISION% %PAD% %FCLTMP%
PUSHD %FCLTMP%
CALL mx NOWAIT %FCLTMP%\UIT
POPD
CALL _CREA_WORK %DBVER% %FCLTMP%\UIT
CALL _CREA_WORK_UPDATE %DBPRV% %DBPRVPATH% %DBVER% %FCLTMP%\UIT

cscript compare.js %DBPRV% %DBVER% >diff%DBVER%.lst 2>>&1

::rmdir /S %FCLTMP%
:EINDE