Show More
@@ -19,14 +19,17 b' from . import (' | |||
|
19 | 19 | util, |
|
20 | 20 | ) |
|
21 | 21 | |
|
22 | # This helper class allows us to handle both: | |
|
23 | # "{files}" (legacy command-line-specific list hack) and | |
|
24 | # "{files % '{file}\n'}" (hgweb-style with inlining and function support) | |
|
25 | # and to access raw values: | |
|
26 | # "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}" | |
|
27 | # "{get(extras, key)}" | |
|
22 | class _hybrid(object): | |
|
23 | """Wrapper for list or dict to support legacy template | |
|
28 | 24 |
|
|
29 | class _hybrid(object): | |
|
25 | This class allows us to handle both: | |
|
26 | - "{files}" (legacy command-line-specific list hack) and | |
|
27 | - "{files % '{file}\n'}" (hgweb-style with inlining and function support) | |
|
28 | and to access raw values: | |
|
29 | - "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}" | |
|
30 | - "{get(extras, key)}" | |
|
31 | """ | |
|
32 | ||
|
30 | 33 | def __init__(self, gen, values, makemap, joinfmt): |
|
31 | 34 | self.gen = gen |
|
32 | 35 | self.values = values |
General Comments 0
You need to be logged in to leave comments.
Login now