comparison easyhg-merge.bat @ 272:256138a4ed0e

* Add easyhg-merge.bat and use it. (This isn't necessary if hg has been properly configured, as the Tortoise distribution has)
author Chris Cannam
date Tue, 25 Jan 2011 16:12:23 +0000
parents
children d2e4bf428cfc
comparison
equal deleted inserted replaced
271:d98c642fc66f 272:256138a4ed0e
1 @echo off
2 setlocal enableextensions
3 setlocal enabledelayedexpansion
4 set mypath=%~dp0
5 set kdiff=kdiff3.exe
6 set found=
7 set SEARCH=%mypath%;%PATH%
8 :loop
9 for /F "delims=; tokens=1*" %%e in ("%SEARCH%") do (
10 if exist "%%e\%kdiff%" (
11 set found=%%e\%kdiff%
12 goto done;
13 )
14 set SEARCH=%%f
15 )
16 if not "%SEARCH%"=="" goto loop;
17 :done
18 if "%found%"=="" (
19 echo. "Failed to find kdiff.exe in path"
20 ) else (
21 "%found%" "%~2" "%~1" "%~3" -o "%~1"
22 )