churn: fix stack traces on Python 3
Differential Revision: https://phab.mercurial-scm.org/D5062
--- a/hgext/churn.py Sat Oct 13 04:00:57 2018 -0400
+++ b/hgext/churn.py Sat Oct 13 05:58:16 2018 -0400
@@ -52,7 +52,8 @@
def getkey(ctx):
t, tz = ctx.date()
date = datetime.datetime(*time.gmtime(float(t) - tz)[:6])
- return date.strftime(encoding.strfromlocal(opts['dateformat']))
+ return encoding.strtolocal(
+ date.strftime(encoding.strfromlocal(opts['dateformat'])))
else:
tmpl = opts.get('oldtemplate') or opts.get('template')
tmpl = logcmdutil.maketemplater(ui, repo, tmpl)