Mercurial
diff third_party/mercurial/hg.sh @ 249:c5129452493e
[deploy] Bundle Mercurial with hg-web
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 04 Aug 2026 04:16:45 -0700 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/third_party/mercurial/hg.sh Tue Aug 04 04:16:45 2026 -0700 @@ -0,0 +1,15 @@ +#!/bin/sh +set -eu + +runtime_root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)" +python_binary="${PYTHON_BIN:-python3.11}" +if ! command -v "$python_binary" >/dev/null 2>&1; then + echo "Mercurial requires CPython 3.11: $python_binary was not found." >&2 + exit 1 +fi +if [ "$("$python_binary" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" != "3.11" ]; then + echo "Mercurial requires CPython 3.11." >&2 + exit 1 +fi +export PYTHONPATH="$runtime_root${PYTHONPATH:+:$PYTHONPATH}" +exec "$python_binary" -m mercurial "$@"