summaryrefslogtreecommitdiffstats
path: root/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'command.py')
-rw-r--r--command.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/command.py b/command.py
index 12fe4172..bd6d0817 100644
--- a/command.py
+++ b/command.py
@@ -144,11 +144,10 @@ class Command(object):
144 help=f'number of jobs to run in parallel (default: {default})') 144 help=f'number of jobs to run in parallel (default: {default})')
145 145
146 m = p.add_option_group('Multi-manifest options') 146 m = p.add_option_group('Multi-manifest options')
147 m.add_option('--outer-manifest', action='store_true', 147 m.add_option('--outer-manifest', action='store_true', default=None,
148 help='operate starting at the outermost manifest') 148 help='operate starting at the outermost manifest')
149 m.add_option('--no-outer-manifest', dest='outer_manifest', 149 m.add_option('--no-outer-manifest', dest='outer_manifest',
150 action='store_false', default=None, 150 action='store_false', help='do not operate on outer manifests')
151 help='do not operate on outer manifests')
152 m.add_option('--this-manifest-only', action='store_true', default=None, 151 m.add_option('--this-manifest-only', action='store_true', default=None,
153 help='only operate on this (sub)manifest') 152 help='only operate on this (sub)manifest')
154 m.add_option('--no-this-manifest-only', '--all-manifests', 153 m.add_option('--no-this-manifest-only', '--all-manifests',
@@ -186,6 +185,10 @@ class Command(object):
186 """Validate common options.""" 185 """Validate common options."""
187 opt.quiet = opt.output_mode is False 186 opt.quiet = opt.output_mode is False
188 opt.verbose = opt.output_mode is True 187 opt.verbose = opt.output_mode is True
188 if opt.outer_manifest is None:
189 # By default, treat multi-manifest instances as a single manifest from
190 # the user's perspective.
191 opt.outer_manifest = True
189 192
190 def ValidateOptions(self, opt, args): 193 def ValidateOptions(self, opt, args):
191 """Validate the user options & arguments before executing. 194 """Validate the user options & arguments before executing.
@@ -385,7 +388,7 @@ class Command(object):
385 opt: The command options. 388 opt: The command options.
386 """ 389 """
387 top = self.outer_manifest 390 top = self.outer_manifest
388 if opt.outer_manifest is False or opt.this_manifest_only: 391 if not opt.outer_manifest or opt.this_manifest_only:
389 top = self.manifest 392 top = self.manifest
390 yield top 393 yield top
391 if not opt.this_manifest_only: 394 if not opt.this_manifest_only: