Show More
@@ -98,10 +98,7 b' class ui(object):' | |||||
98 | raise util.Abort(_("Error in configuration section [%s] " |
|
98 | raise util.Abort(_("Error in configuration section [%s] " | |
99 | "parameter '%s':\n%s") |
|
99 | "parameter '%s':\n%s") | |
100 | % (section, name, inst)) |
|
100 | % (section, name, inst)) | |
101 | if self.parentui is None: |
|
101 | return default | |
102 | return default |
|
|||
103 | else: |
|
|||
104 | return self.parentui._config(section, name, default, funcname) |
|
|||
105 |
|
102 | |||
106 | def config(self, section, name, default=None): |
|
103 | def config(self, section, name, default=None): | |
107 | return self._config(section, name, default, 'get') |
|
104 | return self._config(section, name, default, 'get') | |
@@ -124,8 +121,6 b' class ui(object):' | |||||
124 |
|
121 | |||
125 | def configitems(self, section): |
|
122 | def configitems(self, section): | |
126 | items = {} |
|
123 | items = {} | |
127 | if self.parentui is not None: |
|
|||
128 | items = dict(self.parentui.configitems(section)) |
|
|||
129 | if self.cdata.has_section(section): |
|
124 | if self.cdata.has_section(section): | |
130 | try: |
|
125 | try: | |
131 | items.update(dict(self.cdata.items(section))) |
|
126 | items.update(dict(self.cdata.items(section))) | |
@@ -136,9 +131,8 b' class ui(object):' | |||||
136 | x.sort() |
|
131 | x.sort() | |
137 | return x |
|
132 | return x | |
138 |
|
133 | |||
139 |
def walkconfig(self |
|
134 | def walkconfig(self): | |
140 |
|
|
135 | seen = {} | |
141 | seen = {} |
|
|||
142 | for (section, name), value in self.overlay.iteritems(): |
|
136 | for (section, name), value in self.overlay.iteritems(): | |
143 | yield section, name, value |
|
137 | yield section, name, value | |
144 | seen[section, name] = 1 |
|
138 | seen[section, name] = 1 | |
@@ -149,9 +143,6 b' class ui(object):' | |||||
149 | if (section, name) in seen: continue |
|
143 | if (section, name) in seen: continue | |
150 | yield section, name, value.replace('\n', '\\n') |
|
144 | yield section, name, value.replace('\n', '\\n') | |
151 | seen[section, name] = 1 |
|
145 | seen[section, name] = 1 | |
152 | if self.parentui is not None: |
|
|||
153 | for parent in self.parentui.walkconfig(seen): |
|
|||
154 | yield parent |
|
|||
155 |
|
146 | |||
156 | def extensions(self): |
|
147 | def extensions(self): | |
157 | result = self.configitems("extensions") |
|
148 | result = self.configitems("extensions") |
General Comments 0
You need to be logged in to leave comments.
Login now