Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG3e1139b7d617: py3: explicitly convert result of dict.items() into list
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
for gs in q.seriesguards: | for gs in q.seriesguards: | ||||
if not gs: | if not gs: | ||||
noguards += 1 | noguards += 1 | ||||
for g in gs: | for g in gs: | ||||
guards.setdefault(g, 0) | guards.setdefault(g, 0) | ||||
guards[g] += 1 | guards[g] += 1 | ||||
if ui.verbose: | if ui.verbose: | ||||
guards['NONE'] = noguards | guards['NONE'] = noguards | ||||
guards = guards.items() | guards = list(guards.items()) | ||||
guards.sort(key=lambda x: x[0][1:]) | guards.sort(key=lambda x: x[0][1:]) | ||||
if guards: | if guards: | ||||
ui.note(_('guards in series file:\n')) | ui.note(_('guards in series file:\n')) | ||||
for guard, count in guards: | for guard, count in guards: | ||||
ui.note('%2d ' % count) | ui.note('%2d ' % count) | ||||
ui.write(guard, '\n') | ui.write(guard, '\n') | ||||
else: | else: | ||||
ui.note(_('no guards in series file\n')) | ui.note(_('no guards in series file\n')) |