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/init.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'subcmds/init.py') diff --git a/subcmds/init.py b/subcmds/init.py index 32c85f79..b9775a34 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -32,6 +32,7 @@ from wrapper import Wrapper class Init(InteractiveCommand, MirrorSafeCommand): COMMON = True + MULTI_MANIFEST_SUPPORT = False helpSummary = "Initialize a repo client checkout in the current directory" helpUsage = """ %prog [options] [manifest url] @@ -90,6 +91,17 @@ to update the working directory files. def _Options(self, p, gitc_init=False): Wrapper().InitParser(p, gitc_init=gitc_init) + m = p.add_option_group('Multi-manifest') + m.add_option('--outer-manifest', action='store_true', + help='operate starting at the outermost manifest') + m.add_option('--no-outer-manifest', dest='outer_manifest', + action='store_false', default=None, + help='do not operate on outer manifests') + m.add_option('--this-manifest-only', action='store_true', default=None, + help='only operate on this (sub)manifest') + m.add_option('--no-this-manifest-only', '--all-manifests', + dest='this_manifest_only', action='store_false', + help='operate on this manifest and its submanifests') def _RegisteredEnvironmentOptions(self): return {'REPO_MANIFEST_URL': 'manifest_url', -- cgit v1.2.3-54-g00ecf