[PATCH 1 of 3 hglib] config: un-break showconfig wrapper when environment variables are used

Augie Fackler raf at durin42.com
Sun Dec 10 17:54:52 UTC 2017


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# 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))


More information about the Mercurial-devel mailing list