From cc879a97c3e2614d19b15b4661c3cab4d33139c9 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Thu, 18 Nov 2021 22:40:18 +0000 Subject: Add multi-manifest support with element 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 Reviewed-by: Mike Frysinger --- subcmds/status.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'subcmds/status.py') 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: outstring.append(''.join([status_header, item, '/'])) def Execute(self, opt, args): - all_projects = self.GetProjects(args) + all_projects = self.GetProjects(args, all_manifests=not opt.this_manifest_only) def _ProcessResults(_pool, _output, results): ret = 0 @@ -141,9 +141,10 @@ the following meanings: if opt.orphans: proj_dirs = set() proj_dirs_parents = set() - for project in self.GetProjects(None, missing_ok=True): - proj_dirs.add(project.relpath) - (head, _tail) = os.path.split(project.relpath) + for project in self.GetProjects(None, missing_ok=True, all_manifests=not opt.this_manifest_only): + relpath = project.RelPath(local=opt.this_manifest_only) + proj_dirs.add(relpath) + (head, _tail) = os.path.split(relpath) while head != "": proj_dirs_parents.add(head) (head, _tail) = os.path.split(head) -- cgit v1.2.3-54-g00ecf