summaryrefslogtreecommitdiffstats
path: root/subcmds/list.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/list.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/list.py')
-rw-r--r--subcmds/list.py7
1 files changed, 4 insertions, 3 deletions
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"'.
77 args: Positional args. Can be a list of projects to list, or empty. 77 args: Positional args. Can be a list of projects to list, or empty.
78 """ 78 """
79 if not opt.regex: 79 if not opt.regex:
80 projects = self.GetProjects(args, groups=opt.groups, missing_ok=opt.all) 80 projects = self.GetProjects(args, groups=opt.groups, missing_ok=opt.all,
81 all_manifests=not opt.this_manifest_only)
81 else: 82 else:
82 projects = self.FindProjects(args) 83 projects = self.FindProjects(args, all_manifests=not opt.this_manifest_only)
83 84
84 def _getpath(x): 85 def _getpath(x):
85 if opt.fullpath: 86 if opt.fullpath:
86 return x.worktree 87 return x.worktree
87 if opt.relative_to: 88 if opt.relative_to:
88 return os.path.relpath(x.worktree, opt.relative_to) 89 return os.path.relpath(x.worktree, opt.relative_to)
89 return x.relpath 90 return x.RelPath(local=opt.this_manifest_only)
90 91
91 lines = [] 92 lines = []
92 for project in projects: 93 for project in projects: