Mercurial > public > mercurial-scm > python-hglib
comparison hglib/client.py @ 195:7c37f08d303d
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.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 10 Dec 2017 12:37:36 -0500 |
parents | 22767a1e61ac |
children | c586d02f7cda |
comparison
equal
deleted
inserted
replaced
194:22767a1e61ac | 195:7c37f08d303d |
---|---|
679 *names) | 679 *names) |
680 out = self.rawcommand(args) | 680 out = self.rawcommand(args) |
681 | 681 |
682 conf = [] | 682 conf = [] |
683 if showsource: | 683 if showsource: |
684 out = util.skiplines(out, b('read config from: ')) | 684 out = util.skiplines(out, (b('read config from: '), |
685 b('set config by: '))) | |
685 for line in out.splitlines(): | 686 for line in out.splitlines(): |
686 m = re.match(b(r"(.+?:(?:\d+:)?) (.*)"), line) | 687 m = re.match(b(r"(.+?:(?:\d+:)?) (.*)"), line) |
687 t = splitline(m.group(2)) | 688 t = splitline(m.group(2)) |
688 conf.append((m.group(1)[:-1], t[0], t[1], t[2])) | 689 conf.append((m.group(1)[:-1], t[0], t[1], t[2])) |
689 else: | 690 else: |