[PATCH 1 of 3] chg: extract gethgcmd logic to a function

Sean Farley sean at farley.io
Wed Feb 24 13:24:02 EST 2016


Jun Wu <quark at fb.com> writes:

> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1456323840 0
> #      Wed Feb 24 14:24:00 2016 +0000
> # Node ID fb9caea246de70223b26fe94ffcd1f6b32ba49a6
> # Parent  1d3998abd58ad32bd17381e14a530ff7ff175d48
> chg: extract gethgcmd logic to a function
>
> gethgcmd is to get original hg (not chg) binary name. This patch extracts
> the logic from execcmdserver to make it available for the following patch.
>
> diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
> --- a/contrib/chg/chg.c
> +++ b/contrib/chg/chg.c
> @@ -190,13 +190,22 @@
>  	opts->lockfd = -1;
>  }
>  
> +static const char *gethgcmd(void)
> +{
> +	static const char *hgcmd;

Did you mean to change this to static?


More information about the Mercurial-devel mailing list