Submitter | Augie Fackler |
---|---|
Date | Dec. 10, 2017, 5:54 p.m. |
Message ID | <fd22223e0c7b22d8807e.1512928492@imladris.local> |
Download | mbox | patch |
Permalink | /patch/26201/ |
State | Accepted |
Headers | show |
Comments
On Sun, 10 Dec 2017 12:54:52 -0500, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <raf@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 These look good to me. > 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: ')) Nit: perhaps these prefixes can be a tuple since util.skiplines() just passes 'prefix' to bytes.startswith().
> On Dec 11, 2017, at 08:10, Yuya Nishihara <yuya@tcha.org> wrote: > > On Sun, 10 Dec 2017 12:54:52 -0500, Augie Fackler wrote: >> # HG changeset patch >> # User Augie Fackler <raf@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 > > These look good to me. > >> 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: ')) > > Nit: perhaps these prefixes can be a tuple since util.skiplines() just passes > 'prefix' to bytes.startswith(). Thanks, pushed with that fixed!
Patch
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))