from west import log from west import configuration as config from west.commands import extension_commands, \ CommandError, CommandContextError, ExtensionCommandError from west.commands.project import List, ManifestCommand, Diff, Status, \ SelfUpdate, ForAll, Init, Update from west.commands.config import Config from west.manifest import Manifest, MalformedConfig from west.util import quote_sh_list, west_topdir, WestNotFound from west.version import __version__ BUILTIN_COMMANDS = { 'commands for managing multiple git repositories': [ Init(), Update(), List(), ManifestCommand(), Diff(), Status(), ForAll(), ], 'configuring west': [Config()], # None is for hidden commands we don't want to show to the user. None: [SelfUpdate()] } # Initialize the set with the virtual 'help' command so that an extension # command cannot clash with it BUILTIN_COMMAND_NAMES = set(['help']) for group, commands in BUILTIN_COMMANDS.items():
import shutil import sys from subprocess import CalledProcessError, check_output, DEVNULL import textwrap from west import log from west import config from west.commands import CommandError, CommandContextError, external_commands from west.commands.project import List, Diff, Status, SelfUpdate, ForAll, \ WestUpdated, PostInit, Update from west.manifest import Manifest, MalformedConfig from west.util import quote_sh_list PROJECT_COMMANDS = { 'commands for managing multiple git repositories': [List(), Diff(), Status(), Update(), SelfUpdate(), ForAll()] } # Commands we don't want to show to the user. For now, this is PostInit. HIDDEN_COMMANDS = {None: [PostInit()]} # Built-in commands in this West. For compatibility with monorepo # installations of West within the Zephyr tree, we only expose the # project commands if this is a multirepo installation. BUILTIN_COMMANDS = dict(PROJECT_COMMANDS) BUILTIN_COMMANDS.update(HIDDEN_COMMANDS) BUILTIN_COMMAND_NAMES = set() for group, commands in BUILTIN_COMMANDS.items():