chg: use --daemon-postexec chdir:/ instead of --cwd /
The chgserver is designed to load repo config from current directory. "--cwd /"
will prevent chgserver from loading repo config and generate a wrong
confighash, which will result in a redirect loop. This patch removes "--cwd /"
and uses "--daemon-postexec chdir:/" instead.
--- a/contrib/chg/chg.c Wed Mar 09 01:17:02 2016 +0000
+++ b/contrib/chg/chg.c Wed Mar 09 01:20:57 2016 +0000
@@ -211,10 +211,9 @@
const char *baseargv[] = {
hgcmd,
"serve",
- "--cwd", "/",
"--cmdserver", "chgunix",
"--address", opts->sockname,
- "--daemon-postexec", "none",
+ "--daemon-postexec", "chdir:/",
"--pid-file", opts->pidfile,
"--config", "extensions.chgserver=",
};