[PATCH 3 of 4] chg: use --daemon-postexec chdir:/ instead of --cwd /
Jun Wu
quark at fb.com
Tue Mar 8 21:23:25 EST 2016
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1457486457 0
# Wed Mar 09 01:20:57 2016 +0000
# Node ID e18454eee99d96f1dc16833c98951cadc50a3b1c
# Parent 671eb2d843fbac71cbaaaae875985941e920ed2a
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 use "--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 @@
const char *baseargv[] = {
hgcmd,
"serve",
- "--cwd", "/",
"--cmdserver", "chgunix",
"--address", opts->sockname,
- "--daemon-postexec", "none",
+ "--daemon-postexec", "chdir:/",
"--pid-file", opts->pidfile,
"--config", "extensions.chgserver=",
};
More information about the Mercurial-devel
mailing list