# HG changeset patch # User Jun Wu # Date 2016-03-09 01:20:57 # Node ID 8a7110e351eccbfd58797f1d1be835f7e38576e1 # Parent 0bb01c8754bf405ec380022c2d9d48f3798340d3 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. diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -211,10 +211,9 @@ static void execcmdserver(const struct c const char *baseargv[] = { hgcmd, "serve", - "--cwd", "/", "--cmdserver", "chgunix", "--address", opts->sockname, - "--daemon-postexec", "none", + "--daemon-postexec", "chdir:/", "--pid-file", opts->pidfile, "--config", "extensions.chgserver=", };