diff options
Diffstat (limited to 'subcmds/info.py')
| -rw-r--r-- | subcmds/info.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/subcmds/info.py b/subcmds/info.py index 6c1246ef..4bedf9d5 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
| @@ -61,6 +61,8 @@ class Info(PagedCommand): | |||
| 61 | 61 | ||
| 62 | self.opt = opt | 62 | self.opt = opt |
| 63 | 63 | ||
| 64 | if not opt.this_manifest_only: | ||
| 65 | self.manifest = self.manifest.outer_client | ||
| 64 | manifestConfig = self.manifest.manifestProject.config | 66 | manifestConfig = self.manifest.manifestProject.config |
| 65 | mergeBranch = manifestConfig.GetBranch("default").merge | 67 | mergeBranch = manifestConfig.GetBranch("default").merge |
| 66 | manifestGroups = (manifestConfig.GetString('manifest.groups') | 68 | manifestGroups = (manifestConfig.GetString('manifest.groups') |
| @@ -80,17 +82,17 @@ class Info(PagedCommand): | |||
| 80 | self.printSeparator() | 82 | self.printSeparator() |
| 81 | 83 | ||
| 82 | if not opt.overview: | 84 | if not opt.overview: |
| 83 | self.printDiffInfo(args) | 85 | self._printDiffInfo(opt, args) |
| 84 | else: | 86 | else: |
| 85 | self.printCommitOverview(args) | 87 | self._printCommitOverview(opt, args) |
| 86 | 88 | ||
| 87 | def printSeparator(self): | 89 | def printSeparator(self): |
| 88 | self.text("----------------------------") | 90 | self.text("----------------------------") |
| 89 | self.out.nl() | 91 | self.out.nl() |
| 90 | 92 | ||
| 91 | def printDiffInfo(self, args): | 93 | def _printDiffInfo(self, opt, args): |
| 92 | # We let exceptions bubble up to main as they'll be well structured. | 94 | # We let exceptions bubble up to main as they'll be well structured. |
| 93 | projs = self.GetProjects(args) | 95 | projs = self.GetProjects(args, all_manifests=not opt.this_manifest_only) |
| 94 | 96 | ||
| 95 | for p in projs: | 97 | for p in projs: |
| 96 | self.heading("Project: ") | 98 | self.heading("Project: ") |
| @@ -179,9 +181,9 @@ class Info(PagedCommand): | |||
| 179 | self.text(" ".join(split[1:])) | 181 | self.text(" ".join(split[1:])) |
| 180 | self.out.nl() | 182 | self.out.nl() |
| 181 | 183 | ||
| 182 | def printCommitOverview(self, args): | 184 | def _printCommitOverview(self, opt, args): |
| 183 | all_branches = [] | 185 | all_branches = [] |
| 184 | for project in self.GetProjects(args): | 186 | for project in self.GetProjects(args, all_manifests=not opt.this_manifest_only): |
| 185 | br = [project.GetUploadableBranch(x) | 187 | br = [project.GetUploadableBranch(x) |
| 186 | for x in project.GetBranches()] | 188 | for x in project.GetBranches()] |
| 187 | br = [x for x in br if x] | 189 | br = [x for x in br if x] |
| @@ -200,7 +202,7 @@ class Info(PagedCommand): | |||
| 200 | if project != branch.project: | 202 | if project != branch.project: |
| 201 | project = branch.project | 203 | project = branch.project |
| 202 | self.out.nl() | 204 | self.out.nl() |
| 203 | self.headtext(project.relpath) | 205 | self.headtext(project.RelPath(local=opt.this_manifest_only)) |
| 204 | self.out.nl() | 206 | self.out.nl() |
| 205 | 207 | ||
| 206 | commits = branch.commits | 208 | commits = branch.commits |
