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

Augie Fackler raf at durin42.com
Thu Nov 10 17:10:42 EST 2016


# 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))
                 continue
             m = unsetre.match(l)
             if m:


More information about the Mercurial-devel mailing list