Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 37946:2095331ff926
hgweb: wrap {rename} with mappinglist
No bare list of mappings should be put in a template mapping.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 02 Apr 2018 00:00:29 +0900 |
parents | 7738ae638b62 |
children | 7fae76c2c564 |
comparison
equal
deleted
inserted
replaced
37945:bbff7170f665 | 37946:2095331ff926 |
---|---|
817 diffs = webutil.diffs(web, ctx, basectx, [path], style) | 817 diffs = webutil.diffs(web, ctx, basectx, [path], style) |
818 if fctx is not None: | 818 if fctx is not None: |
819 rename = webutil.renamelink(fctx) | 819 rename = webutil.renamelink(fctx) |
820 ctx = fctx | 820 ctx = fctx |
821 else: | 821 else: |
822 rename = [] | 822 rename = templateutil.mappinglist([]) |
823 ctx = ctx | 823 ctx = ctx |
824 | 824 |
825 return web.sendtemplate( | 825 return web.sendtemplate( |
826 'filediff', | 826 'filediff', |
827 file=path, | 827 file=path, |
890 comparison = webutil.compare(web.tmpl, context, leftlines, rightlines) | 890 comparison = webutil.compare(web.tmpl, context, leftlines, rightlines) |
891 if fctx is not None: | 891 if fctx is not None: |
892 rename = webutil.renamelink(fctx) | 892 rename = webutil.renamelink(fctx) |
893 ctx = fctx | 893 ctx = fctx |
894 else: | 894 else: |
895 rename = [] | 895 rename = templateutil.mappinglist([]) |
896 ctx = ctx | 896 ctx = ctx |
897 | 897 |
898 return web.sendtemplate( | 898 return web.sendtemplate( |
899 'filecomparison', | 899 'filecomparison', |
900 file=path, | 900 file=path, |