chg: use --daemon-postexec chdir:/ instead of --cwd /
authorJun Wu <quark@fb.com>
Wed, 09 Mar 2016 01:20:57 +0000
changeset 28453 8a7110e351ec
parent 28452 0bb01c8754bf
child 28454 8062869860b8
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.
contrib/chg/chg.c
--- 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=",
 	};