Mercurial > hg
changeset 36151: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 | fa4d333cac58 |
children | 7f5108e58083 |
files | mercurial/progress.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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: