Details
Details
- Reviewers
 indygreg - Group Reviewers
 hg-reviewers - Commits
 - rHGd541042f32f6: progress: determine padding width portably
 
Diff Detail
Diff Detail
- Repository
 - rHG Mercurial
 - Lint
 Lint Skipped - Unit
 Unit Tests Skipped 
| indygreg | 
| hg-reviewers | 
| Lint Skipped | 
| Unit Tests Skipped | 
| needprogress = False | needprogress = False | ||||
| tail = '' | tail = '' | ||||
| for indicator in self.order: | for indicator in self.order: | ||||
| add = '' | add = '' | ||||
| if indicator == 'topic': | if indicator == 'topic': | ||||
| add = topic | add = topic | ||||
| elif indicator == 'number': | elif indicator == 'number': | ||||
| if total: | if total: | ||||
| add = ('% ' + str(len(str(total))) + | padamount = '%d' % len(str(total)) | ||||
| 's/%s') % (pos, total) | add = ('% '+ padamount + 's/%s') % (pos, total) | ||||
| else: | else: | ||||
| add = str(pos) | add = str(pos) | ||||
| elif indicator.startswith('item') and item: | elif indicator.startswith('item') and item: | ||||
| slice = 'end' | slice = 'end' | ||||
| if '-' in indicator: | if '-' in indicator: | ||||
| wid = int(indicator.split('-')[1]) | wid = int(indicator.split('-')[1]) | ||||
| elif '+' in indicator: | elif '+' in indicator: | ||||
| slice = 'beginning' | slice = 'beginning' | ||||