summaryrefslogtreecommitdiffstats
path: root/subcmds/status.py
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@google.com>2021-11-18 22:40:18 +0000
committerLaMont Jones <lamontjones@google.com>2022-02-17 21:57:55 +0000
commitcc879a97c3e2614d19b15b4661c3cab4d33139c9 (patch)
tree69d225e9f0e9d79fec8f423d9c40c275f0bf3b8c /subcmds/status.py
parent87cce68b28c34fa86895baa8d7f48307382e6c75 (diff)
downloadgit-repo-cc879a97c3e2614d19b15b4661c3cab4d33139c9.tar.gz
Add multi-manifest support with <submanifest> elementv2.22
To be addressed in another change: - a partial `repo sync` (with a list of projects/paths to sync) requires `--this-tree-only`. Change-Id: I6c7400bf001540e9d7694fa70934f8f204cb5f57 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322657 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/status.py')
-rw-r--r--subcmds/status.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/subcmds/status.py b/subcmds/status.py
index 5b669547..0aa4200f 100644
--- a/subcmds/status.py
+++ b/subcmds/status.py
@@ -117,7 +117,7 @@ the following meanings:
117 outstring.append(''.join([status_header, item, '/'])) 117 outstring.append(''.join([status_header, item, '/']))
118 118
119 def Execute(self, opt, args): 119 def Execute(self, opt, args):
120 all_projects = self.GetProjects(args) 120 all_projects = self.GetProjects(args, all_manifests=not opt.this_manifest_only)
121 121
122 def _ProcessResults(_pool, _output, results): 122 def _ProcessResults(_pool, _output, results):
123 ret = 0 123 ret = 0
@@ -141,9 +141,10 @@ the following meanings:
141 if opt.orphans: 141 if opt.orphans:
142 proj_dirs = set() 142 proj_dirs = set()
143 proj_dirs_parents = set() 143 proj_dirs_parents = set()
144 for project in self.GetProjects(None, missing_ok=True): 144 for project in self.GetProjects(None, missing_ok=True, all_manifests=not opt.this_manifest_only):
145 proj_dirs.add(project.relpath) 145 relpath = project.RelPath(local=opt.this_manifest_only)
146 (head, _tail) = os.path.split(project.relpath) 146 proj_dirs.add(relpath)
147 (head, _tail) = os.path.split(relpath)
147 while head != "": 148 while head != "":
148 proj_dirs_parents.add(head) 149 proj_dirs_parents.add(head)
149 (head, _tail) = os.path.split(head) 150 (head, _tail) = os.path.split(head)