changeset 38066:543b7b349b2c

py3: make sure we pass str to date.strftime() Differential Revision: https://phab.mercurial-scm.org/D3590
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 19 May 2018 18:21:21 +0530
parents 64280cd4b454
children a40041caf8af
files hgext/churn.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)