Mercurial > hg > easyhg
annotate easyhg-merge.bat @ 624:38c84c66ad7a
* Added "show in" to show selected file in explorer
author | Sam Izzo <sam@humbug.net> |
---|---|
date | Sun, 26 Aug 2012 01:59:53 +1000 |
parents | d2e4bf428cfc |
children |
rev | line source |
---|---|
Chris@272 | 1 @echo off |
Chris@272 | 2 setlocal enableextensions |
Chris@272 | 3 setlocal enabledelayedexpansion |
Chris@272 | 4 set mypath=%~dp0 |
Chris@272 | 5 set kdiff=kdiff3.exe |
Chris@272 | 6 set found= |
Chris@272 | 7 set SEARCH=%mypath%;%PATH% |
Chris@272 | 8 :loop |
Chris@272 | 9 for /F "delims=; tokens=1*" %%e in ("%SEARCH%") do ( |
Chris@272 | 10 if exist "%%e\%kdiff%" ( |
Chris@272 | 11 set found=%%e\%kdiff% |
Chris@272 | 12 goto done; |
Chris@272 | 13 ) |
Chris@272 | 14 set SEARCH=%%f |
Chris@272 | 15 ) |
Chris@272 | 16 if not "%SEARCH%"=="" goto loop; |
Chris@272 | 17 :done |
Chris@272 | 18 if "%found%"=="" ( |
Chris@272 | 19 echo. "Failed to find kdiff.exe in path" |
Chris@272 | 20 ) else ( |
Chris@379 | 21 "%found%" "%~2" "%~1" "%~3" -o "%~1" --auto -L1 "%~1 (Common ancestor)" -L2 "%~1 (Your current version)" -L3 "%~1 (Version being merged)" |
Chris@272 | 22 ) |