Show More
@@ -319,7 +319,7 b' def join(context, mapping, args):' | |||
|
319 | 319 | # TODO: perhaps this should be evalfuncarg(), but it can't because hgweb |
|
320 | 320 | # abuses generator as a keyword that returns a list of dicts. |
|
321 | 321 | joinset = evalrawexp(context, mapping, args[0]) |
|
322 | joinset = templateutil.unwrapvalue(joinset) | |
|
322 | joinset = templateutil.unwrapvalue(context, mapping, joinset) | |
|
323 | 323 | joinfmt = getattr(joinset, 'joinfmt', pycompat.identity) |
|
324 | 324 | joiner = " " |
|
325 | 325 | if len(args) > 1: |
@@ -157,7 +157,7 b' def unwraphybrid(context, mapping, thing' | |||
|
157 | 157 | return thing |
|
158 | 158 | return thing.show(context, mapping) |
|
159 | 159 | |
|
160 | def unwrapvalue(thing): | |
|
160 | def unwrapvalue(context, mapping, thing): | |
|
161 | 161 | """Move the inner value object out of the wrapper""" |
|
162 | 162 | if not util.safehasattr(thing, '_value'): |
|
163 | 163 | return thing |
@@ -327,7 +327,7 b' def evalfuncarg(context, mapping, arg):' | |||
|
327 | 327 | # is fixed. we can't do that right now because join() has to take a generator |
|
328 | 328 | # of byte strings as it is, not a lazy byte string. |
|
329 | 329 | def _unwrapvalue(context, mapping, thing): |
|
330 | thing = unwrapvalue(thing) | |
|
330 | thing = unwrapvalue(context, mapping, thing) | |
|
331 | 331 | # evalrawexp() may return string, generator of strings or arbitrary object |
|
332 | 332 | # such as date tuple, but filter does not want generator. |
|
333 | 333 | if isinstance(thing, types.GeneratorType): |
@@ -344,7 +344,7 b' def evalboolean(context, mapping, arg):' | |||
|
344 | 344 | thing = stringutil.parsebool(data) |
|
345 | 345 | else: |
|
346 | 346 | thing = func(context, mapping, data) |
|
347 | thing = unwrapvalue(thing) | |
|
347 | thing = unwrapvalue(context, mapping, thing) | |
|
348 | 348 | if isinstance(thing, bool): |
|
349 | 349 | return thing |
|
350 | 350 | # other objects are evaluated as strings, which means 0 is True, but |
General Comments 0
You need to be logged in to leave comments.
Login now