Exec hg command
This is the last issue to complete the port to Golang (#2 (closed)). Once we know that it's a hg
command and we've got the internal REST API response, we need to exec
the inner hg serve -R <REPO_PATH> --stdio
command with the proper environment variables.
Most of these environment variables are mandatory, notably REMOTE_USER
(expresses permission), and HGRCPATH
. Some are less important, such as HEPTAPOD_PROJECT_PATH
(see heptapod#72 (closed)). All of them are easy to fill: that's what the API Response is there for.
In the Ruby version this is done in exec_hg_cmd, where the full list of needed environment variables can be seen.