py3: use stringutil.pprint() if we are printing bool values
authorPulkit Goyal <pulkit@yandex-team.ru>
Sat, 13 Oct 2018 04:24:19 +0300
changeset 40220 c7ffc53fbd19
parent 40219 7ba6b880b09a
child 40221 6d52c2275c30
py3: use stringutil.pprint() if we are printing bool values Differential Revision: https://phab.mercurial-scm.org/D5031
hgext/keyword.py
--- a/hgext/keyword.py	Sat Oct 13 04:21:02 2018 +0300
+++ b/hgext/keyword.py	Sat Oct 13 04:24:19 2018 +0300
@@ -430,6 +430,8 @@
     def demoitems(section, items):
         ui.write('[%s]\n' % section)
         for k, v in sorted(items):
+            if isinstance(v, bool):
+                v = stringutil.pprint(v)
             ui.write('%s = %s\n' % (k, v))
 
     fn = 'demo.txt'