progress: determine padding width portably
Differential Revision: https://phab.mercurial-scm.org/D2225
--- a/mercurial/progress.py Tue Feb 13 08:41:42 2018 -0500
+++ b/mercurial/progress.py Tue Feb 13 08:43:14 2018 -0500
@@ -119,8 +119,8 @@
add = topic
elif indicator == 'number':
if total:
- add = ('% ' + str(len(str(total))) +
- 's/%s') % (pos, total)
+ padamount = '%d' % len(str(total))
+ add = ('% '+ padamount + 's/%s') % (pos, total)
else:
add = str(pos)
elif indicator.startswith('item') and item: