Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/templatefuncs.py @ 37262:8e57c3b0dce4
templatefuncs: do not crash because of invalid value fed to mailmap()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Apr 2018 11:06:29 +0900 |
parents | 3685a79ea51b |
children | 7d3bc1d4e871 |
comparison
equal
deleted
inserted
replaced
37261:d29f6fbd1181 | 37262:8e57c3b0dce4 |
---|---|
173 """Return the author, updated according to the value | 173 """Return the author, updated according to the value |
174 set in the .mailmap file""" | 174 set in the .mailmap file""" |
175 if len(args) != 1: | 175 if len(args) != 1: |
176 raise error.ParseError(_("mailmap expects one argument")) | 176 raise error.ParseError(_("mailmap expects one argument")) |
177 | 177 |
178 author = evalfuncarg(context, mapping, args[0]) | 178 author = evalstring(context, mapping, args[0]) |
179 | 179 |
180 cache = context.resource(mapping, 'cache') | 180 cache = context.resource(mapping, 'cache') |
181 repo = context.resource(mapping, 'repo') | 181 repo = context.resource(mapping, 'repo') |
182 | 182 |
183 if 'mailmap' not in cache: | 183 if 'mailmap' not in cache: |