diff options
Diffstat (limited to 'subcmds/stage.py')
-rw-r--r-- | subcmds/stage.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/subcmds/stage.py b/subcmds/stage.py index 0389a4ff..5f17cb64 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py | |||
@@ -50,7 +50,9 @@ The '%prog' command stages files to prepare the next commit. | |||
50 | self.Usage() | 50 | self.Usage() |
51 | 51 | ||
52 | def _Interactive(self, opt, args): | 52 | def _Interactive(self, opt, args): |
53 | all_projects = [p for p in self.GetProjects(args) if p.IsDirty()] | 53 | all_projects = [ |
54 | p for p in self.GetProjects(args, all_manifests=not opt.this_manifest_only) | ||
55 | if p.IsDirty()] | ||
54 | if not all_projects: | 56 | if not all_projects: |
55 | print('no projects have uncommitted modifications', file=sys.stderr) | 57 | print('no projects have uncommitted modifications', file=sys.stderr) |
56 | return | 58 | return |
@@ -62,7 +64,8 @@ The '%prog' command stages files to prepare the next commit. | |||
62 | 64 | ||
63 | for i in range(len(all_projects)): | 65 | for i in range(len(all_projects)): |
64 | project = all_projects[i] | 66 | project = all_projects[i] |
65 | out.write('%3d: %s', i + 1, project.relpath + '/') | 67 | out.write('%3d: %s', i + 1, |
68 | project.RelPath(local=opt.this_manifest_only) + '/') | ||
66 | out.nl() | 69 | out.nl() |
67 | out.nl() | 70 | out.nl() |
68 | 71 | ||
@@ -99,7 +102,9 @@ The '%prog' command stages files to prepare the next commit. | |||
99 | _AddI(all_projects[a_index - 1]) | 102 | _AddI(all_projects[a_index - 1]) |
100 | continue | 103 | continue |
101 | 104 | ||
102 | projects = [p for p in all_projects if a in [p.name, p.relpath]] | 105 | projects = [ |
106 | p for p in all_projects | ||
107 | if a in [p.name, p.RelPath(local=opt.this_manifest_only)]] | ||
103 | if len(projects) == 1: | 108 | if len(projects) == 1: |
104 | _AddI(projects[0]) | 109 | _AddI(projects[0]) |
105 | continue | 110 | continue |