567 This exists for backward compatibility with the old-style template. Use |
567 This exists for backward compatibility with the old-style template. Use |
568 hybridlist() for new template keywords. |
568 hybridlist() for new template keywords. |
569 """ |
569 """ |
570 f = _showcompatlist(context, mapping, name, data, plural, separator) |
570 f = _showcompatlist(context, mapping, name, data, plural, separator) |
571 return hybridlist(data, name=element or name, fmt=fmt, gen=f) |
571 return hybridlist(data, name=element or name, fmt=fmt, gen=f) |
|
572 |
|
573 def compatfileslist(context, mapping, name, files): |
|
574 """Wrap list of file names to support old-style list template and field |
|
575 names |
|
576 |
|
577 This exists for backward compatibility. Use hybridlist for new template |
|
578 keywords. |
|
579 """ |
|
580 f = _showcompatlist(context, mapping, name, files) |
|
581 return hybrid(f, files, lambda x: {'file': x, 'path': x}, |
|
582 pycompat.identity) |
572 |
583 |
573 def _showcompatlist(context, mapping, name, values, plural=None, separator=' '): |
584 def _showcompatlist(context, mapping, name, values, plural=None, separator=' '): |
574 """Return a generator that renders old-style list template |
585 """Return a generator that renders old-style list template |
575 |
586 |
576 name is name of key in template map. |
587 name is name of key in template map. |