Mercurial
comparison hg-web/dev.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 | a8d6435dc021 |
| children |
comparison
equal
deleted
inserted
replaced
| 248:b8b6e726964a | 249:c5129452493e |
|---|---|
| 31 echo "Run this target from the Zenbu workspace." >&2 | 31 echo "Run this target from the Zenbu workspace." >&2 |
| 32 exit 1 | 32 exit 1 |
| 33 fi | 33 fi |
| 34 | 34 |
| 35 server="$(rlocation _main/hg-web/hg_web_server)" | 35 server="$(rlocation _main/hg-web/hg_web_server)" |
| 36 hg_binary="$(rlocation _main/third_party/mercurial/runtime/bin/hg)" | |
| 36 runfiles_workspace="$(dirname "$(dirname "$server")")" | 37 runfiles_workspace="$(dirname "$(dirname "$server")")" |
| 37 hg_pid="" | 38 hg_pid="" |
| 38 server_pid="" | 39 server_pid="" |
| 39 | 40 |
| 40 cleanup() { | 41 cleanup() { |
| 52 } | 53 } |
| 53 | 54 |
| 54 trap cleanup EXIT | 55 trap cleanup EXIT |
| 55 trap 'exit 130' INT TERM | 56 trap 'exit 130' INT TERM |
| 56 | 57 |
| 57 hg --repository "$workspace" serve \ | 58 HGRCPATH= "$hg_binary" \ |
| 59 --config "web.allow-push=" \ | |
| 60 --config "web.deny-push=*" \ | |
| 61 --repository "$workspace" serve \ | |
| 58 --address 127.0.0.1 \ | 62 --address 127.0.0.1 \ |
| 59 --port 4444 \ | 63 --port 4444 \ |
| 60 --accesslog - \ | 64 --accesslog - \ |
| 61 --errorlog - & | 65 --errorlog - & |
| 62 hg_pid=$! | 66 hg_pid=$! |