config: pass some optional args as keywords
authorAugie Fackler <raf@durin42.com>
Fri, 03 Mar 2017 12:55:49 -0500
changeset 31155 8266802f0fa4
parent 31154 fd3f4bf9325e
child 31156 e5aab82edf7f
config: pass some optional args as keywords This makes it a little more obvious that self.read is being passed as include, which took me a moment to figure out.
mercurial/config.py
--- a/mercurial/config.py	Fri Mar 03 13:28:24 2017 -0500
+++ b/mercurial/config.py	Fri Mar 03 12:55:49 2017 -0500
@@ -170,4 +170,5 @@
     def read(self, path, fp=None, sections=None, remap=None):
         if not fp:
             fp = util.posixfile(path, 'rb')
-        self.parse(path, fp.read(), sections, remap, self.read)
+        self.parse(path, fp.read(),
+                   sections=sections, remap=remap, include=self.read)