Mercurial > hg
comparison hgext/keyword.py @ 40220:c7ffc53fbd19
py3: use stringutil.pprint() if we are printing bool values
Differential Revision: https://phab.mercurial-scm.org/D5031
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sat, 13 Oct 2018 04:24:19 +0300 |
parents | 7ce9dea3a14a |
children | d98ec36be808 |
comparison
equal
deleted
inserted
replaced
40219:7ba6b880b09a | 40220:c7ffc53fbd19 |
---|---|
428 See :hg:`help templates` for information on templates and filters. | 428 See :hg:`help templates` for information on templates and filters. |
429 ''' | 429 ''' |
430 def demoitems(section, items): | 430 def demoitems(section, items): |
431 ui.write('[%s]\n' % section) | 431 ui.write('[%s]\n' % section) |
432 for k, v in sorted(items): | 432 for k, v in sorted(items): |
433 if isinstance(v, bool): | |
434 v = stringutil.pprint(v) | |
433 ui.write('%s = %s\n' % (k, v)) | 435 ui.write('%s = %s\n' % (k, v)) |
434 | 436 |
435 fn = 'demo.txt' | 437 fn = 'demo.txt' |
436 tmpdir = pycompat.mkdtemp('', 'kwdemo.') | 438 tmpdir = pycompat.mkdtemp('', 'kwdemo.') |
437 ui.note(_('creating temporary repository at %s\n') % tmpdir) | 439 ui.note(_('creating temporary repository at %s\n') % tmpdir) |