# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-05-21 17:56:53 # Node ID 282f3daac1d7a81654dc70c317187e23c8b2008c # Parent f44306940c94cc191997c5618830b02212edf7bf 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 diff --git a/hgext/churn.py b/hgext/churn.py --- a/hgext/churn.py +++ b/hgext/churn.py @@ -52,7 +52,7 @@ def countrate(ui, repo, amap, *pats, **o 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)