py3: make sure we pass str to date.strftime()
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 19 May 2018 18:21:21 +0530
changeset 38099 543b7b349b2c
parent 38098 64280cd4b454
child 38100 a40041caf8af
py3: make sure we pass str to date.strftime() Differential Revision: https://phab.mercurial-scm.org/D3590
hgext/churn.py
--- a/hgext/churn.py	Sat May 19 21:47:59 2018 +0530
+++ b/hgext/churn.py	Sat May 19 18:21:21 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(opts['dateformat'])
+            return date.strftime(pycompat.sysstr(opts['dateformat']))
     else:
         tmpl = opts.get('oldtemplate') or opts.get('template')
         tmpl = logcmdutil.maketemplater(ui, repo, tmpl)