# HG changeset patch # User Augie Fackler # Date 2018-10-13 09:58:16 # Node ID 6f3e733848aeb5f7266d3e21373f1b9045cacdda # Parent 379dd054614bdf645712ee51ac172c8b08ab3dc2 churn: fix stack traces on Python 3 Differential Revision: https://phab.mercurial-scm.org/D5062 diff --git a/hgext/churn.py b/hgext/churn.py --- a/hgext/churn.py +++ b/hgext/churn.py @@ -52,7 +52,8 @@ 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(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)