From patchwork Sun Dec 10 17:54:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1, of, 3, hglib] config: un-break showconfig wrapper when environment variables are used From: Augie Fackler X-Patchwork-Id: 26201 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 10 Dec 2017 12:54:52 -0500 # HG changeset patch # User Augie Fackler # Date 1512927456 18000 # Sun Dec 10 12:37:36 2017 -0500 # Node ID fd22223e0c7b22d8807e30f96f734d10c59f4433 # Parent 22767a1e61acff3521c0b84589546906274cdbcf config: un-break showconfig wrapper when environment variables are used This was broken when hg was picking up $EDITOR etc and showing that in the showconfig --debug output. No test because I can't figure out how to thread the environment variable down into the executed hg binary, but this fixes the failure on my laptop. diff --git a/hglib/client.py b/hglib/client.py --- a/hglib/client.py +++ b/hglib/client.py @@ -682,6 +682,7 @@ class hgclient(object): conf = [] if showsource: out = util.skiplines(out, b('read config from: ')) + out = util.skiplines(out, b('set config by: ')) for line in out.splitlines(): m = re.match(b(r"(.+?:(?:\d+:)?) (.*)"), line) t = splitline(m.group(2))