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/list.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'subcmds/list.py') diff --git a/subcmds/list.py b/subcmds/list.py index 6adf85b7..ad8036ee 100644 --- a/subcmds/list.py +++ b/subcmds/list.py @@ -77,16 +77,17 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'. args: Positional args. Can be a list of projects to list, or empty. """ if not opt.regex: - projects = self.GetProjects(args, groups=opt.groups, missing_ok=opt.all) + projects = self.GetProjects(args, groups=opt.groups, missing_ok=opt.all, + all_manifests=not opt.this_manifest_only) else: - projects = self.FindProjects(args) + projects = self.FindProjects(args, all_manifests=not opt.this_manifest_only) def _getpath(x): if opt.fullpath: return x.worktree if opt.relative_to: return os.path.relpath(x.worktree, opt.relative_to) - return x.relpath + return x.RelPath(local=opt.this_manifest_only) lines = [] for project in projects: -- cgit v1.2.3-54-g00ecf