[PATCH 4 of 5 py3] config: record source file and line number as a sysstr

Pulkit Goyal 7895pulkit at gmail.com
Fri Nov 11 10:12:38 EST 2016


On Fri, Nov 11, 2016 at 8:16 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Thu, 10 Nov 2016 17:10:42 -0500, Augie Fackler wrote:
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1476021520 14400
>> #      Sun Oct 09 09:58:40 2016 -0400
>> # Node ID 61d6c1706d3246ea08a4176a5b3d286f498b8054
>> # Parent  86c54d5610fc355ba0a68b51319740a1a8b4a975
>> config: record source file and line number as a sysstr
>>
>> We've already got the path to a config file as a sysstr, so we can
>> just store this information as a sysstr as well.
>>
>> diff --git a/mercurial/config.py b/mercurial/config.py
>> --- a/mercurial/config.py
>> +++ b/mercurial/config.py
>> @@ -153,7 +153,7 @@ class config(object):
>>                  cont = True
>>                  if sections and section not in sections:
>>                      continue
>> -                self.set(section, item, m.group(2), "%s:%d" % (src, line))
>> +                self.set(section, item, m.group(2), r"%s:%d" % (src, line))
>
> IIRC, Pulkit is/was going to convert the data path to bytes. Also, source
> can be printed via ui.write(), which should be bytes.

Hehe is converting ;)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list