diff -r 754a0ff2ceaa -r f1f7646e8e24 scripts/install.py --- a/scripts/install.py Sun Jul 18 14:28:27 2021 +0200 +++ b/scripts/install.py Sun Jul 25 12:26:07 2021 +0200 @@ -1758,10 +1758,17 @@ with contextlib.suppress(OSError): os.rename(fileName, fileName + ".orig") - try: - hgOut = subprocess.check_output(["hg", "identify", "-i"]) # secok - hgOut = hgOut.decode() - except (OSError, subprocess.CalledProcessError): + if sys.platform.startswith(("win", "cygwin")): + localHg = os.path.join(sys.exec_prefix, "Scripts", "hg.exe") + else: + localHg = os.path.join(sys.exec_prefix, "bin", "hg") + for hg in (localHg, "hg"): + with contextlib.suppress(OSError, subprocess.CalledProcessError): + hgOut = subprocess.check_output(["hg", "identify", "-i"]) # secok + hgOut = hgOut.decode() + if hgOut: + break + else: hgOut = "" if hgOut: hgOut = hgOut.strip()