view easyhg-merge.bat @ 363:f89e50d748ed feature_93

Enable Push button whenever the repo is non-empty, even when there is no remote location -- ask for remote location when it is pressed. Also change "Change Remote..." to "Set Remote..." to be consistent with this new usage
author Chris Cannam
date Thu, 17 Mar 2011 17:48:18 +0000
parents 256138a4ed0e
children d2e4bf428cfc
line wrap: on
line source
@echo off
setlocal enableextensions
setlocal enabledelayedexpansion
set mypath=%~dp0
set kdiff=kdiff3.exe
set found=
set SEARCH=%mypath%;%PATH%
:loop
for /F "delims=; tokens=1*" %%e in ("%SEARCH%") do (
    if exist "%%e\%kdiff%" (
        set found=%%e\%kdiff%
        goto done;
    )
    set SEARCH=%%f
)
if not "%SEARCH%"=="" goto loop;
:done
if "%found%"=="" (
    echo. "Failed to find kdiff.exe in path"
) else (
    "%found%" "%~2" "%~1" "%~3" -o "%~1"
)