##// END OF EJS Templates
runtests: add a function to test if IPv6 is available...
runtests: add a function to test if IPv6 is available Previously, checkportisavailable returns True if the port is free either on IPv4 or IPv6, but the hg server only uses IPv4 by default. That leads to issues when IPv4 port is not free but the IPv6 one is. To address that, run-tests should stick with either IPv4 or IPv6. This patch adds a function similar to checkportisavailable to test if IPv6 is available, and assigns the result to a variable. The new function was tested in a Linux system script with the following steps: 1. Run "ip addr del ::1/128 dev lo" to delete lo's IPv6 address, Confirm checkipv6available() returns False. 2. Run "ip addr add ::1/128 dev lo" to add back lo's IPv6 address. Confirm checkipv6available() returns True. 3. Start a web server taking the 8000 port. Confirm checkipv6available(8000) is still True.

File last commit:

r23934:975c4fc4 stable
r30984:15f9084a default
Show More
hg.bat
19 lines | 475 B | application/x-msdownload | BatchLexer
@echo off
rem Windows Driver script for Mercurial
setlocal
set HG=%~f0
rem Use a full path to Python (relative to this script) if it exists,
rem as the standard Python install does not put python.exe on the PATH...
rem Otherwise, expect that python.exe can be found on the PATH.
rem %~dp0 is the directory of this script
if exist "%~dp0..\python.exe" (
"%~dp0..\python" "%~dp0hg" %*
) else (
python "%~dp0hg" %*
)
endlocal
exit /b %ERRORLEVEL%