# HG changeset patch # User Augie Fackler # Date 1518529394 18000 # Node ID d541042f32f6a18ee96c31f2333aca9f601162b2 # Parent fa4d333cac586fffe2ec0bd3faabe791b1a2ae08 progress: determine padding width portably Differential Revision: https://phab.mercurial-scm.org/D2225 diff -r fa4d333cac58 -r d541042f32f6 mercurial/progress.py --- 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: