Show More
@@ -1610,7 +1610,7 b' def getbundlechunks(repo, source, heads=' | |||||
1610 | for name in getbundle2partsorder: |
|
1610 | for name in getbundle2partsorder: | |
1611 | func = getbundle2partsmapping[name] |
|
1611 | func = getbundle2partsmapping[name] | |
1612 | func(bundler, repo, source, bundlecaps=bundlecaps, b2caps=b2caps, |
|
1612 | func(bundler, repo, source, bundlecaps=bundlecaps, b2caps=b2caps, | |
1613 | **kwargs) |
|
1613 | **pycompat.strkwargs(kwargs)) | |
1614 |
|
1614 | |||
1615 | return bundler.getchunks() |
|
1615 | return bundler.getchunks() | |
1616 |
|
1616 |
@@ -24,6 +24,7 b' from .i18n import _' | |||||
24 | from . import ( |
|
24 | from . import ( | |
25 | error, |
|
25 | error, | |
26 | mdiff, |
|
26 | mdiff, | |
|
27 | pycompat, | |||
27 | util, |
|
28 | util, | |
28 | vfs as vfsmod, |
|
29 | vfs as vfsmod, | |
29 | ) |
|
30 | ) | |
@@ -455,7 +456,8 b' def simplemerge(ui, local, base, other, ' | |||||
455 | extrakwargs['base_marker'] = '|||||||' |
|
456 | extrakwargs['base_marker'] = '|||||||' | |
456 | extrakwargs['name_base'] = name_base |
|
457 | extrakwargs['name_base'] = name_base | |
457 | extrakwargs['minimize'] = False |
|
458 | extrakwargs['minimize'] = False | |
458 |
for line in m3.merge_lines(name_a=name_a, name_b=name_b, |
|
459 | for line in m3.merge_lines(name_a=name_a, name_b=name_b, | |
|
460 | **pycompat.strkwargs(extrakwargs)): | |||
459 | out.write(line) |
|
461 | out.write(line) | |
460 |
|
462 | |||
461 | if not opts.get('print'): |
|
463 | if not opts.get('print'): |
@@ -119,23 +119,24 b' def _showlist(name, values, mapping, plu' | |||||
119 | expand 'end_foos'. |
|
119 | expand 'end_foos'. | |
120 | ''' |
|
120 | ''' | |
121 | templ = mapping['templ'] |
|
121 | templ = mapping['templ'] | |
|
122 | strmapping = pycompat.strkwargs(mapping) | |||
122 | if not plural: |
|
123 | if not plural: | |
123 | plural = name + 's' |
|
124 | plural = name + 's' | |
124 | if not values: |
|
125 | if not values: | |
125 | noname = 'no_' + plural |
|
126 | noname = 'no_' + plural | |
126 | if noname in templ: |
|
127 | if noname in templ: | |
127 | yield templ(noname, **mapping) |
|
128 | yield templ(noname, **strmapping) | |
128 | return |
|
129 | return | |
129 | if name not in templ: |
|
130 | if name not in templ: | |
130 | if isinstance(values[0], bytes): |
|
131 | if isinstance(values[0], bytes): | |
131 | yield separator.join(values) |
|
132 | yield separator.join(values) | |
132 | else: |
|
133 | else: | |
133 | for v in values: |
|
134 | for v in values: | |
134 | yield dict(v, **mapping) |
|
135 | yield dict(v, **strmapping) | |
135 | return |
|
136 | return | |
136 | startname = 'start_' + plural |
|
137 | startname = 'start_' + plural | |
137 | if startname in templ: |
|
138 | if startname in templ: | |
138 | yield templ(startname, **mapping) |
|
139 | yield templ(startname, **strmapping) | |
139 | vmapping = mapping.copy() |
|
140 | vmapping = mapping.copy() | |
140 | def one(v, tag=name): |
|
141 | def one(v, tag=name): | |
141 | try: |
|
142 | try: | |
@@ -146,7 +147,7 b' def _showlist(name, values, mapping, plu' | |||||
146 | vmapping[a] = b |
|
147 | vmapping[a] = b | |
147 | except ValueError: |
|
148 | except ValueError: | |
148 | vmapping[name] = v |
|
149 | vmapping[name] = v | |
149 | return templ(tag, **vmapping) |
|
150 | return templ(tag, **pycompat.strkwargs(vmapping)) | |
150 | lastname = 'last_' + name |
|
151 | lastname = 'last_' + name | |
151 | if lastname in templ: |
|
152 | if lastname in templ: | |
152 | last = values.pop() |
|
153 | last = values.pop() | |
@@ -158,7 +159,7 b' def _showlist(name, values, mapping, plu' | |||||
158 | yield one(last, tag=lastname) |
|
159 | yield one(last, tag=lastname) | |
159 | endname = 'end_' + plural |
|
160 | endname = 'end_' + plural | |
160 | if endname in templ: |
|
161 | if endname in templ: | |
161 | yield templ(endname, **mapping) |
|
162 | yield templ(endname, **strmapping) | |
162 |
|
163 | |||
163 | def _formatrevnode(ctx): |
|
164 | def _formatrevnode(ctx): | |
164 | """Format changeset as '{rev}:{node|formatnode}', which is the default |
|
165 | """Format changeset as '{rev}:{node|formatnode}', which is the default |
@@ -371,7 +371,7 b' def runsymbol(context, mapping, key, def' | |||||
371 | except TemplateNotFound: |
|
371 | except TemplateNotFound: | |
372 | v = default |
|
372 | v = default | |
373 | if callable(v): |
|
373 | if callable(v): | |
374 | return v(**mapping) |
|
374 | return v(**pycompat.strkwargs(mapping)) | |
375 | return v |
|
375 | return v | |
376 |
|
376 | |||
377 | def buildtemplate(exp, context): |
|
377 | def buildtemplate(exp, context): |
General Comments 0
You need to be logged in to leave comments.
Login now