NOTE TO SELF: To fix the HTTP 500 error in Mercurial’s hgwebdir.cgi, it was needed to change the first line from “#!/usr/bin/env python” to “#!/usr/local/bin/python” .
—