for hg-serve.sh