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
--- 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)