comparison mercurial/progress.py @ 36453:2831d918e1b4

py3: convert known-int values to bytes using %d I decided to grep around for \sstr\( and see what low-hanging fruit that showed me. This was part of that hunt. That grep pattern still has some things worth exploring. Differential Revision: https://phab.mercurial-scm.org/D2441
author Augie Fackler <augie@google.com>
date Sun, 25 Feb 2018 23:09:07 -0500
parents 707aba4d48b5
children 6bd9f18d31a8
comparison
equal deleted inserted replaced
36452:04c319a07c7b 36453:2831d918e1b4
119 add = topic 119 add = topic
120 elif indicator == 'number': 120 elif indicator == 'number':
121 if total: 121 if total:
122 add = b'%*d/%d' % (len(str(total)), pos, total) 122 add = b'%*d/%d' % (len(str(total)), pos, total)
123 else: 123 else:
124 add = str(pos) 124 add = b'%d' % pos
125 elif indicator.startswith('item') and item: 125 elif indicator.startswith('item') and item:
126 slice = 'end' 126 slice = 'end'
127 if '-' in indicator: 127 if '-' in indicator:
128 wid = int(indicator.split('-')[1]) 128 wid = int(indicator.split('-')[1])
129 elif '+' in indicator: 129 elif '+' in indicator: