Mercurial > hg
changeset 38124:282f3daac1d7
py3: use encoding.strfromlocal() instead of pycompat.sysstr()
opts['dateformat'] is provided by the user and can be encoded in local encoding.
Thanks to Yuya for catching.
Differential Revision: https://phab.mercurial-scm.org/D3642
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 21 May 2018 23:26:53 +0530 |
parents | f44306940c94 |
children | 6ef01102ebff |
files | hgext/churn.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/churn.py Sun May 20 23:05:18 2018 -0400 +++ b/hgext/churn.py Mon May 21 23:26:53 2018 +0530 @@ -52,7 +52,7 @@ def getkey(ctx): t, tz = ctx.date() date = datetime.datetime(*time.gmtime(float(t) - tz)[:6]) - return date.strftime(pycompat.sysstr(opts['dateformat'])) + return date.strftime(encoding.strfromlocal(opts['dateformat'])) else: tmpl = opts.get('oldtemplate') or opts.get('template') tmpl = logcmdutil.maketemplater(ui, repo, tmpl)