comparison mercurial/dispatch.py @ 35898:a2b3b5c5a25a

py3: replace "if ispy3" by pycompat.bytestr()
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Jan 2018 13:11:46 +0900
parents 48fe4f56a3b4
children d5457d94e1c9
comparison
equal deleted inserted replaced
35897:4b1c04082cdc 35898:a2b3b5c5a25a
819 if options["profile"]: 819 if options["profile"]:
820 profiler.start() 820 profiler.start()
821 821
822 if options['verbose'] or options['debug'] or options['quiet']: 822 if options['verbose'] or options['debug'] or options['quiet']:
823 for opt in ('verbose', 'debug', 'quiet'): 823 for opt in ('verbose', 'debug', 'quiet'):
824 val = str(bool(options[opt])) 824 val = pycompat.bytestr(bool(options[opt]))
825 if pycompat.ispy3:
826 val = val.encode('ascii')
827 for ui_ in uis: 825 for ui_ in uis:
828 ui_.setconfig('ui', opt, val, '--' + opt) 826 ui_.setconfig('ui', opt, val, '--' + opt)
829 827
830 if options['traceback']: 828 if options['traceback']:
831 for ui_ in uis: 829 for ui_ in uis: