blob: a6189ed6bc8b34c8e45b342dfacc622b5807679b [file] [log] [blame]
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -07001# Copyright (C) 2008 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Mike Frysingerb5d075d2021-03-01 00:56:38 -050015import multiprocessing
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -070016import optparse
Mike Frysinger64477332023-08-21 21:20:32 -040017import os
Colin Cross5acde752012-03-28 20:15:45 -070018import re
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -070019
Colin Cross5acde752012-03-28 20:15:45 -070020from error import InvalidProjectGroupsError
Mike Frysinger64477332023-08-21 21:20:32 -040021from error import NoSuchProjectError
Jason Changf9aacd42023-08-03 14:38:00 -070022from error import RepoExitError
Mike Frysinger64477332023-08-21 21:20:32 -040023from event_log import EventLog
Mike Frysingerb5d075d2021-03-01 00:56:38 -050024import progress
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -070025
David Pursehouseb148ac92012-11-16 09:33:39 +090026
Mike Frysingerdf8b1cb2021-07-26 15:59:20 -040027# Are we generating man-pages?
Gavin Makea2e3302023-03-11 06:46:20 +000028GENERATE_MANPAGES = os.environ.get("_REPO_GENERATE_MANPAGES_") == " indeed! "
Mike Frysingerdf8b1cb2021-07-26 15:59:20 -040029
30
Mike Frysinger7c871162021-02-16 01:45:39 -050031# Number of projects to submit to a single worker process at a time.
32# This number represents a tradeoff between the overhead of IPC and finer
33# grained opportunity for parallelism. This particular value was chosen by
34# iterating through powers of two until the overall performance no longer
35# improved. The performance of this batch size is not a function of the
36# number of cores on the system.
37WORKER_BATCH_SIZE = 32
38
39
Mike Frysinger6a2400a2021-02-16 01:43:31 -050040# How many jobs to run in parallel by default? This assumes the jobs are
41# largely I/O bound and do not hit the network.
42DEFAULT_LOCAL_JOBS = min(os.cpu_count(), 8)
43
44
Jason Changf9aacd42023-08-03 14:38:00 -070045class UsageError(RepoExitError):
46 """Exception thrown with invalid command usage."""
47
48
Mike Frysingerd4aee652023-10-19 05:13:32 -040049class Command:
Gavin Makea2e3302023-03-11 06:46:20 +000050 """Base class for any command line action in repo."""
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -070051
Gavin Makea2e3302023-03-11 06:46:20 +000052 # Singleton for all commands to track overall repo command execution and
53 # provide event summary to callers. Only used by sync subcommand currently.
54 #
55 # NB: This is being replaced by git trace2 events. See git_trace2_event_log.
56 event_log = EventLog()
Mike Frysingerd88b3692021-06-14 16:09:29 -040057
Gavin Makea2e3302023-03-11 06:46:20 +000058 # Whether this command is a "common" one, i.e. whether the user would
59 # commonly use it or it's a more uncommon command. This is used by the help
60 # command to show short-vs-full summaries.
61 COMMON = False
Mike Frysinger4f210542021-06-14 16:05:19 -040062
Gavin Makea2e3302023-03-11 06:46:20 +000063 # Whether this command supports running in parallel. If greater than 0,
64 # it is the number of parallel jobs to default to.
65 PARALLEL_JOBS = None
Mike Frysinger6a2400a2021-02-16 01:43:31 -050066
Gavin Makea2e3302023-03-11 06:46:20 +000067 # Whether this command supports Multi-manifest. If False, then main.py will
68 # iterate over the manifests and invoke the command once per (sub)manifest.
69 # This is only checked after calling ValidateOptions, so that partially
70 # migrated subcommands can set it to False.
71 MULTI_MANIFEST_SUPPORT = True
LaMont Jonescc879a92021-11-18 22:40:18 +000072
Gavin Makea2e3302023-03-11 06:46:20 +000073 def __init__(
74 self,
75 repodir=None,
76 client=None,
77 manifest=None,
Gavin Makea2e3302023-03-11 06:46:20 +000078 git_event_log=None,
79 outer_client=None,
80 outer_manifest=None,
81 ):
82 self.repodir = repodir
83 self.client = client
84 self.outer_client = outer_client or client
85 self.manifest = manifest
Gavin Makea2e3302023-03-11 06:46:20 +000086 self.git_event_log = git_event_log
87 self.outer_manifest = outer_manifest
Mike Frysingerd58d0dd2021-06-14 16:17:27 -040088
Gavin Makea2e3302023-03-11 06:46:20 +000089 # Cache for the OptionParser property.
90 self._optparse = None
Mike Frysingerd58d0dd2021-06-14 16:17:27 -040091
Gavin Makea2e3302023-03-11 06:46:20 +000092 def WantPager(self, _opt):
93 return False
Shawn O. Pearcedb45da12009-04-18 13:49:13 -070094
Gavin Makea2e3302023-03-11 06:46:20 +000095 def ReadEnvironmentOptions(self, opts):
96 """Set options from environment variables."""
David Pursehouseb148ac92012-11-16 09:33:39 +090097
Gavin Makea2e3302023-03-11 06:46:20 +000098 env_options = self._RegisteredEnvironmentOptions()
David Pursehouseb148ac92012-11-16 09:33:39 +090099
Gavin Makea2e3302023-03-11 06:46:20 +0000100 for env_key, opt_key in env_options.items():
101 # Get the user-set option value if any
102 opt_value = getattr(opts, opt_key)
David Pursehouseb148ac92012-11-16 09:33:39 +0900103
Gavin Makea2e3302023-03-11 06:46:20 +0000104 # If the value is set, it means the user has passed it as a command
105 # line option, and we should use that. Otherwise we can try to set
106 # it with the value from the corresponding environment variable.
107 if opt_value is not None:
108 continue
David Pursehouseb148ac92012-11-16 09:33:39 +0900109
Gavin Makea2e3302023-03-11 06:46:20 +0000110 env_value = os.environ.get(env_key)
111 if env_value is not None:
112 setattr(opts, opt_key, env_value)
David Pursehouseb148ac92012-11-16 09:33:39 +0900113
Gavin Makea2e3302023-03-11 06:46:20 +0000114 return opts
David Pursehouseb148ac92012-11-16 09:33:39 +0900115
Gavin Makea2e3302023-03-11 06:46:20 +0000116 @property
117 def OptionParser(self):
118 if self._optparse is None:
119 try:
120 me = "repo %s" % self.NAME
121 usage = self.helpUsage.strip().replace("%prog", me)
122 except AttributeError:
123 usage = "repo %s" % self.NAME
124 epilog = (
125 "Run `repo help %s` to view the detailed manual." % self.NAME
126 )
127 self._optparse = optparse.OptionParser(usage=usage, epilog=epilog)
128 self._CommonOptions(self._optparse)
129 self._Options(self._optparse)
130 return self._optparse
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700131
Gavin Makea2e3302023-03-11 06:46:20 +0000132 def _CommonOptions(self, p, opt_v=True):
133 """Initialize the option parser with common options.
Mike Frysinger9180a072021-04-13 14:57:40 -0400134
Gavin Makea2e3302023-03-11 06:46:20 +0000135 These will show up for *all* subcommands, so use sparingly.
136 NB: Keep in sync with repo:InitParser().
137 """
138 g = p.add_option_group("Logging options")
139 opts = ["-v"] if opt_v else []
140 g.add_option(
141 *opts,
142 "--verbose",
143 dest="output_mode",
144 action="store_true",
145 help="show all output",
146 )
147 g.add_option(
148 "-q",
149 "--quiet",
150 dest="output_mode",
151 action="store_false",
152 help="only show errors",
153 )
Mike Frysinger9180a072021-04-13 14:57:40 -0400154
Gavin Makea2e3302023-03-11 06:46:20 +0000155 if self.PARALLEL_JOBS is not None:
156 default = "based on number of CPU cores"
157 if not GENERATE_MANPAGES:
158 # Only include active cpu count if we aren't generating man
159 # pages.
160 default = f"%default; {default}"
161 p.add_option(
162 "-j",
163 "--jobs",
164 type=int,
165 default=self.PARALLEL_JOBS,
166 help=f"number of jobs to run in parallel (default: {default})",
167 )
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700168
Gavin Makea2e3302023-03-11 06:46:20 +0000169 m = p.add_option_group("Multi-manifest options")
170 m.add_option(
171 "--outer-manifest",
172 action="store_true",
173 default=None,
174 help="operate starting at the outermost manifest",
175 )
176 m.add_option(
177 "--no-outer-manifest",
178 dest="outer_manifest",
179 action="store_false",
180 help="do not operate on outer manifests",
181 )
182 m.add_option(
183 "--this-manifest-only",
184 action="store_true",
185 default=None,
186 help="only operate on this (sub)manifest",
187 )
188 m.add_option(
189 "--no-this-manifest-only",
190 "--all-manifests",
191 dest="this_manifest_only",
192 action="store_false",
193 help="operate on this manifest and its submanifests",
194 )
LaMont Jonescc879a92021-11-18 22:40:18 +0000195
Gavin Makea2e3302023-03-11 06:46:20 +0000196 def _Options(self, p):
197 """Initialize the option parser with subcommand-specific options."""
Mike Frysinger9180a072021-04-13 14:57:40 -0400198
Gavin Makea2e3302023-03-11 06:46:20 +0000199 def _RegisteredEnvironmentOptions(self):
200 """Get options that can be set from environment variables.
David Pursehouseb148ac92012-11-16 09:33:39 +0900201
Gavin Makea2e3302023-03-11 06:46:20 +0000202 Return a dictionary mapping environment variable name
203 to option key name that it can override.
David Pursehouseb148ac92012-11-16 09:33:39 +0900204
Gavin Makea2e3302023-03-11 06:46:20 +0000205 Example: {'REPO_MY_OPTION': 'my_option'}
David Pursehouseb148ac92012-11-16 09:33:39 +0900206
Gavin Makea2e3302023-03-11 06:46:20 +0000207 Will allow the option with key value 'my_option' to be set
208 from the value in the environment variable named 'REPO_MY_OPTION'.
David Pursehouseb148ac92012-11-16 09:33:39 +0900209
Gavin Makea2e3302023-03-11 06:46:20 +0000210 Note: This does not work properly for options that are explicitly
211 set to None by the user, or options that are defined with a
212 default value other than None.
David Pursehouseb148ac92012-11-16 09:33:39 +0900213
Gavin Makea2e3302023-03-11 06:46:20 +0000214 """
215 return {}
David Pursehouseb148ac92012-11-16 09:33:39 +0900216
Gavin Makea2e3302023-03-11 06:46:20 +0000217 def Usage(self):
218 """Display usage and terminate."""
219 self.OptionParser.print_usage()
Jason Changf9aacd42023-08-03 14:38:00 -0700220 raise UsageError()
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700221
Gavin Makea2e3302023-03-11 06:46:20 +0000222 def CommonValidateOptions(self, opt, args):
223 """Validate common options."""
224 opt.quiet = opt.output_mode is False
225 opt.verbose = opt.output_mode is True
226 if opt.outer_manifest is None:
227 # By default, treat multi-manifest instances as a single manifest
228 # from the user's perspective.
229 opt.outer_manifest = True
Mike Frysinger9180a072021-04-13 14:57:40 -0400230
Gavin Makea2e3302023-03-11 06:46:20 +0000231 def ValidateOptions(self, opt, args):
232 """Validate the user options & arguments before executing.
Mike Frysingerae6cb082019-08-27 01:10:59 -0400233
Gavin Makea2e3302023-03-11 06:46:20 +0000234 This is meant to help break the code up into logical steps. Some tips:
235 * Use self.OptionParser.error to display CLI related errors.
236 * Adjust opt member defaults as makes sense.
237 * Adjust the args list, but do so inplace so the caller sees updates.
238 * Try to avoid updating self state. Leave that to Execute.
239 """
Mike Frysingerae6cb082019-08-27 01:10:59 -0400240
Gavin Makea2e3302023-03-11 06:46:20 +0000241 def Execute(self, opt, args):
242 """Perform the action, after option parsing is complete."""
243 raise NotImplementedError
Conley Owens971de8e2012-04-16 10:36:08 -0700244
Gavin Makea2e3302023-03-11 06:46:20 +0000245 @staticmethod
246 def ExecuteInParallel(
247 jobs, func, inputs, callback, output=None, ordered=False
248 ):
249 """Helper for managing parallel execution boiler plate.
Mike Frysingerb5d075d2021-03-01 00:56:38 -0500250
Gavin Makea2e3302023-03-11 06:46:20 +0000251 For subcommands that can easily split their work up.
Mike Frysingerb5d075d2021-03-01 00:56:38 -0500252
Gavin Makea2e3302023-03-11 06:46:20 +0000253 Args:
254 jobs: How many parallel processes to use.
255 func: The function to apply to each of the |inputs|. Usually a
256 functools.partial for wrapping additional arguments. It will be
257 run in a separate process, so it must be pickalable, so nested
258 functions won't work. Methods on the subcommand Command class
259 should work.
260 inputs: The list of items to process. Must be a list.
261 callback: The function to pass the results to for processing. It
262 will be executed in the main thread and process the results of
263 |func| as they become available. Thus it may be a local nested
264 function. Its return value is passed back directly. It takes
265 three arguments:
266 - The processing pool (or None with one job).
267 - The |output| argument.
268 - An iterator for the results.
269 output: An output manager. May be progress.Progess or
270 color.Coloring.
271 ordered: Whether the jobs should be processed in order.
Mike Frysingerb5d075d2021-03-01 00:56:38 -0500272
Gavin Makea2e3302023-03-11 06:46:20 +0000273 Returns:
274 The |callback| function's results are returned.
275 """
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800276 try:
Gavin Makea2e3302023-03-11 06:46:20 +0000277 # NB: Multiprocessing is heavy, so don't spin it up for one job.
278 if len(inputs) == 1 or jobs == 1:
279 return callback(None, output, (func(x) for x in inputs))
280 else:
281 with multiprocessing.Pool(jobs) as pool:
282 submit = pool.imap if ordered else pool.imap_unordered
283 return callback(
284 pool,
285 output,
286 submit(func, inputs, chunksize=WORKER_BATCH_SIZE),
287 )
288 finally:
289 if isinstance(output, progress.Progress):
290 output.end()
Che-Liang Chioub2bd91c2012-01-11 11:28:42 +0800291
Gavin Makea2e3302023-03-11 06:46:20 +0000292 def _ResetPathToProjectMap(self, projects):
293 self._by_path = dict((p.worktree, p) for p in projects)
LaMont Jonesff6b1da2022-06-01 21:03:34 +0000294
Gavin Makea2e3302023-03-11 06:46:20 +0000295 def _UpdatePathToProjectMap(self, project):
296 self._by_path[project.worktree] = project
LaMont Jonesff6b1da2022-06-01 21:03:34 +0000297
Gavin Makea2e3302023-03-11 06:46:20 +0000298 def _GetProjectByPath(self, manifest, path):
299 project = None
300 if os.path.exists(path):
301 oldpath = None
302 while path and path != oldpath and path != manifest.topdir:
303 try:
304 project = self._by_path[path]
305 break
306 except KeyError:
307 oldpath = path
308 path = os.path.dirname(path)
309 if not project and path == manifest.topdir:
310 try:
311 project = self._by_path[path]
312 except KeyError:
313 pass
314 else:
315 try:
316 project = self._by_path[path]
317 except KeyError:
318 pass
319 return project
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700320
Gavin Makea2e3302023-03-11 06:46:20 +0000321 def GetProjects(
322 self,
323 args,
324 manifest=None,
325 groups="",
326 missing_ok=False,
327 submodules_ok=False,
328 all_manifests=False,
329 ):
330 """A list of projects that match the arguments.
Colin Cross5acde752012-03-28 20:15:45 -0700331
Gavin Makea2e3302023-03-11 06:46:20 +0000332 Args:
333 args: a list of (case-insensitive) strings, projects to search for.
334 manifest: an XmlManifest, the manifest to use, or None for default.
335 groups: a string, the manifest groups in use.
336 missing_ok: a boolean, whether to allow missing projects.
337 submodules_ok: a boolean, whether to allow submodules.
338 all_manifests: a boolean, if True then all manifests and
339 submanifests are used. If False, then only the local
340 (sub)manifest is used.
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700341
Gavin Makea2e3302023-03-11 06:46:20 +0000342 Returns:
343 A list of matching Project instances.
344 """
345 if all_manifests:
346 if not manifest:
347 manifest = self.manifest.outer_client
348 all_projects_list = manifest.all_projects
349 else:
350 if not manifest:
351 manifest = self.manifest
352 all_projects_list = manifest.projects
353 result = []
354
355 if not groups:
356 groups = manifest.GetGroupsStr()
357 groups = [x for x in re.split(r"[,\s]+", groups) if x]
358
359 if not args:
360 derived_projects = {}
361 for project in all_projects_list:
362 if submodules_ok or project.sync_s:
363 derived_projects.update(
364 (p.name, p) for p in project.GetDerivedSubprojects()
365 )
366 all_projects_list.extend(derived_projects.values())
367 for project in all_projects_list:
368 if (missing_ok or project.Exists) and project.MatchesGroups(
369 groups
370 ):
371 result.append(project)
372 else:
373 self._ResetPathToProjectMap(all_projects_list)
374
375 for arg in args:
376 # We have to filter by manifest groups in case the requested
377 # project is checked out multiple times or differently based on
378 # them.
379 projects = [
380 project
Sergiy Belozorov78e82ec2023-01-05 18:57:31 +0100381 for project in manifest.GetProjectsWithName(
Gavin Makea2e3302023-03-11 06:46:20 +0000382 arg, all_manifests=all_manifests
383 )
384 if project.MatchesGroups(groups)
385 ]
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700386
Gavin Makea2e3302023-03-11 06:46:20 +0000387 if not projects:
388 path = os.path.abspath(arg).replace("\\", "/")
389 tree = manifest
390 if all_manifests:
391 # Look for the deepest matching submanifest.
392 for tree in reversed(list(manifest.all_manifests)):
393 if path.startswith(tree.topdir):
394 break
395 project = self._GetProjectByPath(tree, path)
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700396
Gavin Makea2e3302023-03-11 06:46:20 +0000397 # If it's not a derived project, update path->project
398 # mapping and search again, as arg might actually point to
399 # a derived subproject.
400 if (
401 project
402 and not project.Derived
403 and (submodules_ok or project.sync_s)
404 ):
405 search_again = False
406 for subproject in project.GetDerivedSubprojects():
407 self._UpdatePathToProjectMap(subproject)
408 search_again = True
409 if search_again:
410 project = (
411 self._GetProjectByPath(manifest, path)
412 or project
413 )
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700414
Gavin Makea2e3302023-03-11 06:46:20 +0000415 if project:
416 projects = [project]
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700417
Gavin Makea2e3302023-03-11 06:46:20 +0000418 if not projects:
419 raise NoSuchProjectError(arg)
David James8d201162013-10-11 17:03:19 -0700420
Gavin Makea2e3302023-03-11 06:46:20 +0000421 for project in projects:
422 if not missing_ok and not project.Exists:
423 raise NoSuchProjectError(
424 "%s (%s)"
425 % (arg, project.RelPath(local=not all_manifests))
426 )
427 if not project.MatchesGroups(groups):
428 raise InvalidProjectGroupsError(arg)
David James8d201162013-10-11 17:03:19 -0700429
Gavin Makea2e3302023-03-11 06:46:20 +0000430 result.extend(projects)
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700431
Gavin Makea2e3302023-03-11 06:46:20 +0000432 def _getpath(x):
433 return x.relpath
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700434
Gavin Makea2e3302023-03-11 06:46:20 +0000435 result.sort(key=_getpath)
436 return result
LaMont Jonescc879a92021-11-18 22:40:18 +0000437
Gavin Makea2e3302023-03-11 06:46:20 +0000438 def FindProjects(self, args, inverse=False, all_manifests=False):
439 """Find projects from command line arguments.
Zhiguang Lia8864fb2013-03-15 10:32:10 +0800440
Gavin Makea2e3302023-03-11 06:46:20 +0000441 Args:
442 args: a list of (case-insensitive) strings, projects to search for.
443 inverse: a boolean, if True, then projects not matching any |args|
444 are returned.
445 all_manifests: a boolean, if True then all manifests and
446 submanifests are used. If False, then only the local
447 (sub)manifest is used.
448 """
449 result = []
450 patterns = [re.compile(r"%s" % a, re.IGNORECASE) for a in args]
451 for project in self.GetProjects("", all_manifests=all_manifests):
452 paths = [project.name, project.RelPath(local=not all_manifests)]
453 for pattern in patterns:
454 match = any(pattern.search(x) for x in paths)
455 if not inverse and match:
456 result.append(project)
457 break
458 if inverse and match:
459 break
460 else:
461 if inverse:
462 result.append(project)
463 result.sort(
464 key=lambda project: (project.manifest.path_prefix, project.relpath)
465 )
466 return result
LaMont Jonescc879a92021-11-18 22:40:18 +0000467
Gavin Makea2e3302023-03-11 06:46:20 +0000468 def ManifestList(self, opt):
469 """Yields all of the manifests to traverse.
470
471 Args:
472 opt: The command options.
473 """
474 top = self.outer_manifest
475 if not opt.outer_manifest or opt.this_manifest_only:
476 top = self.manifest
477 yield top
478 if not opt.this_manifest_only:
479 for child in top.all_children:
480 yield child
LaMont Jonescc879a92021-11-18 22:40:18 +0000481
Mark E. Hamilton8ccfa742016-02-10 10:44:30 -0700482
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700483class InteractiveCommand(Command):
Gavin Makea2e3302023-03-11 06:46:20 +0000484 """Command which requires user interaction on the tty and must not run
485 within a pager, even if the user asks to.
486 """
David Pursehouse819827a2020-02-12 15:20:19 +0900487
Gavin Makea2e3302023-03-11 06:46:20 +0000488 def WantPager(self, _opt):
489 return False
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700490
Mark E. Hamilton8ccfa742016-02-10 10:44:30 -0700491
The Android Open Source Projectcf31fe92008-10-21 07:00:00 -0700492class PagedCommand(Command):
Gavin Makea2e3302023-03-11 06:46:20 +0000493 """Command which defaults to output in a pager, as its display tends to be
494 larger than one screen full.
495 """
David Pursehouse819827a2020-02-12 15:20:19 +0900496
Gavin Makea2e3302023-03-11 06:46:20 +0000497 def WantPager(self, _opt):
498 return True
Shawn O. Pearcec95583b2009-03-03 17:47:06 -0800499
Mark E. Hamilton8ccfa742016-02-10 10:44:30 -0700500
Mike Frysingerd4aee652023-10-19 05:13:32 -0400501class MirrorSafeCommand:
Gavin Makea2e3302023-03-11 06:46:20 +0000502 """Command permits itself to run within a mirror, and does not require a
503 working directory.
504 """
Dan Willemsen9ff2ece2015-08-31 15:45:06 -0700505
Mark E. Hamilton8ccfa742016-02-10 10:44:30 -0700506
Mike Frysingerd4aee652023-10-19 05:13:32 -0400507class GitcClientCommand:
Gavin Makea2e3302023-03-11 06:46:20 +0000508 """Command that requires the local client to be a GITC client."""