diff options
Diffstat (limited to 'subcmds/overview.py')
| -rw-r--r-- | subcmds/overview.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/overview.py b/subcmds/overview.py index 96fa93d8..a509bd9a 100644 --- a/subcmds/overview.py +++ b/subcmds/overview.py | |||
| @@ -38,16 +38,16 @@ are displayed. | |||
| 38 | help="Consider only checked out branches") | 38 | help="Consider only checked out branches") |
| 39 | 39 | ||
| 40 | def Execute(self, opt, args): | 40 | def Execute(self, opt, args): |
| 41 | all = [] | 41 | all_branches = [] |
| 42 | for project in self.GetProjects(args): | 42 | for project in self.GetProjects(args): |
| 43 | br = [project.GetUploadableBranch(x) | 43 | br = [project.GetUploadableBranch(x) |
| 44 | for x in project.GetBranches().keys()] | 44 | for x in project.GetBranches().keys()] |
| 45 | br = [x for x in br if x] | 45 | br = [x for x in br if x] |
| 46 | if opt.current_branch: | 46 | if opt.current_branch: |
| 47 | br = [x for x in br if x.name == project.CurrentBranch] | 47 | br = [x for x in br if x.name == project.CurrentBranch] |
| 48 | all.extend(br) | 48 | all_branches.extend(br) |
| 49 | 49 | ||
| 50 | if not all: | 50 | if not all_branches: |
| 51 | return | 51 | return |
| 52 | 52 | ||
| 53 | class Report(Coloring): | 53 | class Report(Coloring): |
| @@ -55,13 +55,13 @@ are displayed. | |||
| 55 | Coloring.__init__(self, config, 'status') | 55 | Coloring.__init__(self, config, 'status') |
| 56 | self.project = self.printer('header', attr='bold') | 56 | self.project = self.printer('header', attr='bold') |
| 57 | 57 | ||
| 58 | out = Report(all[0].project.config) | 58 | out = Report(all_branches[0].project.config) |
| 59 | out.project('Projects Overview') | 59 | out.project('Projects Overview') |
| 60 | out.nl() | 60 | out.nl() |
| 61 | 61 | ||
| 62 | project = None | 62 | project = None |
| 63 | 63 | ||
| 64 | for branch in all: | 64 | for branch in all_branches: |
| 65 | if project != branch.project: | 65 | if project != branch.project: |
| 66 | project = branch.project | 66 | project = branch.project |
| 67 | out.nl() | 67 | out.nl() |
