D5062: churn: fix stack traces on Python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat Oct 13 10:06:38 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5062

AFFECTED FILES
  hgext/churn.py

CHANGE DETAILS

diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -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)



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list