Show More
@@ -161,16 +161,13 b' class config(object):' | |||
|
161 | 161 | |
|
162 | 162 | if m and include: |
|
163 | 163 | expanded = util.expandpath(m.group(1)) |
|
164 | inc = os.path.normpath( | |
|
165 | os.path.join(os.path.dirname(src), expanded) | |
|
166 | ) | |
|
167 | 164 | try: |
|
168 |
include(expanded |
|
|
165 | include(expanded, remap=remap, sections=sections) | |
|
169 | 166 | except IOError as inst: |
|
170 | 167 | if inst.errno != errno.ENOENT: |
|
171 | 168 | raise error.ParseError( |
|
172 | 169 | _(b"cannot include %s (%s)") |
|
173 |
% ( |
|
|
170 | % (expanded, encoding.strtolocal(inst.strerror)), | |
|
174 | 171 | b"%s:%d" % (src, line), |
|
175 | 172 | ) |
|
176 | 173 | continue |
@@ -215,7 +212,7 b' class config(object):' | |||
|
215 | 212 | |
|
216 | 213 | dir = os.path.dirname(path) |
|
217 | 214 | |
|
218 |
def include(rel, |
|
|
215 | def include(rel, remap, sections): | |
|
219 | 216 | abs = os.path.normpath(os.path.join(dir, rel)) |
|
220 | 217 | self.read(abs, remap=remap, sections=sections) |
|
221 | 218 |
@@ -36,7 +36,7 b' def state(ctx, ui):' | |||
|
36 | 36 | p = config.config() |
|
37 | 37 | repo = ctx.repo() |
|
38 | 38 | |
|
39 |
def read(f |
|
|
39 | def read(f, sections=None, remap=None): | |
|
40 | 40 | if f in ctx: |
|
41 | 41 | try: |
|
42 | 42 | data = ctx[f].data() |
@@ -56,7 +56,7 b' def state(ctx, ui):' | |||
|
56 | 56 | ) |
|
57 | 57 | |
|
58 | 58 | if b'.hgsub' in ctx: |
|
59 |
read(b'.hgsub' |
|
|
59 | read(b'.hgsub') | |
|
60 | 60 | |
|
61 | 61 | for path, src in ui.configitems(b'subpaths'): |
|
62 | 62 | p.set(b'subpaths', path, src, ui.configsource(b'subpaths', path)) |
@@ -825,7 +825,7 b' def _readmapfile(mapfile):' | |||
|
825 | 825 | base = os.path.dirname(mapfile) |
|
826 | 826 | conf = config.config() |
|
827 | 827 | |
|
828 |
def include(rel, |
|
|
828 | def include(rel, remap, sections): | |
|
829 | 829 | templatedirs = [base, templatedir()] |
|
830 | 830 | for dir in templatedirs: |
|
831 | 831 | if dir is None: |
General Comments 0
You need to be logged in to leave comments.
Login now