summaryrefslogtreecommitdiffstats
path: root/subcmds/init.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/init.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/init.py')
-rw-r--r--subcmds/init.py12
1 files changed, 12 insertions, 0 deletions
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
32 32
33class Init(InteractiveCommand, MirrorSafeCommand): 33class Init(InteractiveCommand, MirrorSafeCommand):
34 COMMON = True 34 COMMON = True
35 MULTI_MANIFEST_SUPPORT = False
35 helpSummary = "Initialize a repo client checkout in the current directory" 36 helpSummary = "Initialize a repo client checkout in the current directory"
36 helpUsage = """ 37 helpUsage = """
37%prog [options] [manifest url] 38%prog [options] [manifest url]
@@ -90,6 +91,17 @@ to update the working directory files.
90 91
91 def _Options(self, p, gitc_init=False): 92 def _Options(self, p, gitc_init=False):
92 Wrapper().InitParser(p, gitc_init=gitc_init) 93 Wrapper().InitParser(p, gitc_init=gitc_init)
94 m = p.add_option_group('Multi-manifest')
95 m.add_option('--outer-manifest', action='store_true',
96 help='operate starting at the outermost manifest')
97 m.add_option('--no-outer-manifest', dest='outer_manifest',
98 action='store_false', default=None,
99 help='do not operate on outer manifests')
100 m.add_option('--this-manifest-only', action='store_true', default=None,
101 help='only operate on this (sub)manifest')
102 m.add_option('--no-this-manifest-only', '--all-manifests',
103 dest='this_manifest_only', action='store_false',
104 help='operate on this manifest and its submanifests')
93 105
94 def _RegisteredEnvironmentOptions(self): 106 def _RegisteredEnvironmentOptions(self):
95 return {'REPO_MANIFEST_URL': 'manifest_url', 107 return {'REPO_MANIFEST_URL': 'manifest_url',