diff options
Diffstat (limited to 'subcmds/branches.py')
-rw-r--r-- | subcmds/branches.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/subcmds/branches.py b/subcmds/branches.py index 7b5decc6..b89cc2f8 100644 --- a/subcmds/branches.py +++ b/subcmds/branches.py | |||
@@ -98,7 +98,7 @@ is shown, then the branch appears in all projects. | |||
98 | PARALLEL_JOBS = DEFAULT_LOCAL_JOBS | 98 | PARALLEL_JOBS = DEFAULT_LOCAL_JOBS |
99 | 99 | ||
100 | def Execute(self, opt, args): | 100 | def Execute(self, opt, args): |
101 | projects = self.GetProjects(args) | 101 | projects = self.GetProjects(args, all_manifests=not opt.this_manifest_only) |
102 | out = BranchColoring(self.manifest.manifestProject.config) | 102 | out = BranchColoring(self.manifest.manifestProject.config) |
103 | all_branches = {} | 103 | all_branches = {} |
104 | project_cnt = len(projects) | 104 | project_cnt = len(projects) |
@@ -147,6 +147,7 @@ is shown, then the branch appears in all projects. | |||
147 | hdr('%c%c %-*s' % (current, published, width, name)) | 147 | hdr('%c%c %-*s' % (current, published, width, name)) |
148 | out.write(' |') | 148 | out.write(' |') |
149 | 149 | ||
150 | _RelPath = lambda p: p.RelPath(local=opt.this_manifest_only) | ||
150 | if in_cnt < project_cnt: | 151 | if in_cnt < project_cnt: |
151 | fmt = out.write | 152 | fmt = out.write |
152 | paths = [] | 153 | paths = [] |
@@ -154,19 +155,20 @@ is shown, then the branch appears in all projects. | |||
154 | if i.IsSplitCurrent or (in_cnt <= project_cnt - in_cnt): | 155 | if i.IsSplitCurrent or (in_cnt <= project_cnt - in_cnt): |
155 | in_type = 'in' | 156 | in_type = 'in' |
156 | for b in i.projects: | 157 | for b in i.projects: |
158 | relpath = b.project.relpath | ||
157 | if not i.IsSplitCurrent or b.current: | 159 | if not i.IsSplitCurrent or b.current: |
158 | paths.append(b.project.relpath) | 160 | paths.append(_RelPath(b.project)) |
159 | else: | 161 | else: |
160 | non_cur_paths.append(b.project.relpath) | 162 | non_cur_paths.append(_RelPath(b.project)) |
161 | else: | 163 | else: |
162 | fmt = out.notinproject | 164 | fmt = out.notinproject |
163 | in_type = 'not in' | 165 | in_type = 'not in' |
164 | have = set() | 166 | have = set() |
165 | for b in i.projects: | 167 | for b in i.projects: |
166 | have.add(b.project.relpath) | 168 | have.add(_RelPath(b.project)) |
167 | for p in projects: | 169 | for p in projects: |
168 | if p.relpath not in have: | 170 | if _RelPath(p) not in have: |
169 | paths.append(p.relpath) | 171 | paths.append(_RelPath(p)) |
170 | 172 | ||
171 | s = ' %s %s' % (in_type, ', '.join(paths)) | 173 | s = ' %s %s' % (in_type, ', '.join(paths)) |
172 | if not i.IsSplitCurrent and (width + 7 + len(s) < 80): | 174 | if not i.IsSplitCurrent and (width + 7 + len(s) < 80): |