changeset 28453:8a7110e351ec

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.
author Jun Wu <quark@fb.com>
date Wed, 09 Mar 2016 01:20:57 +0000
parents 0bb01c8754bf
children 8062869860b8
files contrib/chg/chg.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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=",
 	};