[PATCH 04 of 10] chg: drop --cwd /

Yuya Nishihara yuya at tcha.org
Thu Mar 3 09:44:33 EST 2016


On Wed, 2 Mar 2016 10:44:06 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1456746319 0
> #      Mon Feb 29 11:45:19 2016 +0000
> # Node ID 9cd173eff72962ada9601a368efdb8f87e2eed43
> # Parent  855e65accbb4519f7140828efe6800b0b92fd5f4
> chg: drop --cwd /
> 
> We intensionally want chgserver to load repo config to be able to:
> - find out what extensions it should load
> - detect config changes correctly
> Therefore the --cwd flag is dropped.


> 
> diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
> --- a/contrib/chg/chg.c
> +++ b/contrib/chg/chg.c
> @@ -210,7 +210,6 @@
>  	const char *baseargv[] = {
>  		hgcmd,
>  		"serve",
> -		"--cwd", "/",
>  		"--cmdserver", "chgunix",
>  		"--address", opts->sockname,
>  		"--daemon-postexec", "none",

I don't like the implicit chdir() introduced by the next patch. Probably
we can do "--daemon-postexec chdir:/" instead. It's common for a daemon process
to chdir to / once its boot-up sequence is completed.


More information about the Mercurial-devel mailing list