##// END OF EJS Templates
templatekw: convert list of key/value pairs to sortdict...
Yuya Nishihara -
r24237:9ad02823 default
parent child Browse files
Show More
@@ -241,7 +241,8 b' def showextras(**args):'
241 241 """:extras: List of dicts with key, value entries of the 'extras'
242 242 field of this changeset."""
243 243 extras = args['ctx'].extra()
244 c = [{'key': x[0], 'value': x[1]} for x in sorted(extras.items())]
244 extras = util.sortdict((k, extras[k]) for k in sorted(extras))
245 c = [{'key': k, 'value': extras[k]} for k in extras]
245 246 f = _showlist('extra', c, plural='extras', **args)
246 247 return _hybrid(f, c, lambda x: '%s=%s' % (x['key'], x['value']))
247 248
@@ -267,7 +268,8 b' def showfilecopies(**args):'
267 268 if rename:
268 269 copies.append((fn, rename[0]))
269 270
270 c = [{'name': x[0], 'source': x[1]} for x in copies]
271 copies = util.sortdict(copies)
272 c = [{'name': k, 'source': copies[k]} for k in copies]
271 273 f = _showlist('file_copy', c, plural='file_copies', **args)
272 274 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
273 275
@@ -279,7 +281,8 b' def showfilecopiesswitch(**args):'
279 281 only if the --copied switch is set.
280 282 """
281 283 copies = args['revcache'].get('copies') or []
282 c = [{'name': x[0], 'source': x[1]} for x in copies]
284 copies = util.sortdict(copies)
285 c = [{'name': k, 'source': copies[k]} for k in copies]
283 286 f = _showlist('file_copy', c, plural='file_copies', **args)
284 287 return _hybrid(f, c, lambda x: '%s (%s)' % (x['name'], x['source']))
285 288
General Comments 0
You need to be logged in to leave comments. Login now