hg.bat
author TK Soh <teekaysoh@yahoo.com>
Sun, 13 Jan 2008 06:17:30 +0000
changeset 629 71fa0ab981e8
parent 361 dfaa2d2e4705
permissions -rw-r--r--
hggtk/history: only refresh log window if new rev is checked out

::
:: Win32 batch file to handle TortoiseHg external proc calls
::

@echo off
setlocal

:: Look in the registry for TortoiseHg location
for /f "skip=2 tokens=3*" %%A in (
    '"reg query "HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseHg" /ve 2> nul"' ) do set TortoisePath=%%B
if "%TortoisePath%"=="" (goto :notfound) else (goto :run)

:run
python "%TortoisePath%\hg" %*
goto end

:notfound
echo hgproc: cannot find TortoiseHg location in the registry.

:end