[PATCH 2 of 7] chgserver: set sys.argv to improve compatibility

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Apr 3 23:15:58 EDT 2016



On 04/03/2016 07:30 PM, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1459730303 -3600
> #      Mon Apr 04 01:38:23 2016 +0100
> # Node ID ffe771bf6fa7d5a81a9c9335f28c23688775fc2c
> # Parent  c2c62ede8eb5c192cc134b994cdbff46215664cf
> chgserver: set sys.argv to improve compatibility
>
> Before this patch, extensions reading sys.argv will behave incorrectly when
> running with chg, because chg has a different sys.argv which is how the
> chgserver started.
>
> The chgserver argv is meaningless for extensions (and for chg itself). So
> let's replace it with what the user actually uses passed from the chg client.
>
> Therefore the extensions reading sys.argv even in reposetup will have correct
> behaviors.

Meh, fetching argument from sys.argv is definitly a layer violation, we 
should fixes the extensions themself instead (yep I know, I wrong some 
on that code).

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list