Mercurial > public > mercurial-scm > hg-stable
diff mercurial/progress.py @ 36189:d541042f32f6
progress: determine padding width portably
Differential Revision: https://phab.mercurial-scm.org/D2225
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 13 Feb 2018 08:43:14 -0500 |
parents | 54fa3db5becf |
children | 7f5108e58083 |
line wrap: on
line diff
--- 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: