Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clients = [c for c in vcstool_clients if c.type == repo['type']]
if not clients:
from vcstool.clients.none import NoneClient
job = {
'client': NoneClient(path),
'command': None,
'cwd': path,
'output':
"Repository type '%s' is not supported" % repo['type'],
'returncode': NotImplemented
}
jobs.append(job)
continue
client = clients[0](path)
command = ImportCommand(
args, repo['url'],
str(repo['version']) if 'version' in repo else None,
recursive=args.recursive)
job = {'client': client, 'command': command}
jobs.append(job)
return jobs
def __init__(self, args, url, version=None, recursive=False):
super(ImportCommand, self).__init__(args)
self.url = url
self.version = version
self.force = args.force
self.retry = args.retry
self.skip_existing = args.skip_existing
self.recursive = recursive
from .diff import DiffCommand
from .export import ExportCommand
from .import_ import ImportCommand
from .log import LogCommand
from .pull import PullCommand
from .push import PushCommand
from .remotes import RemotesCommand
from .status import StatusCommand
from .validate import ValidateCommand
vcstool_commands = []
vcstool_commands.append(BranchCommand)
vcstool_commands.append(CustomCommand)
vcstool_commands.append(DiffCommand)
vcstool_commands.append(ExportCommand)
vcstool_commands.append(ImportCommand)
vcstool_commands.append(LogCommand)
vcstool_commands.append(PullCommand)
vcstool_commands.append(PushCommand)
vcstool_commands.append(RemotesCommand)
vcstool_commands.append(StatusCommand)
vcstool_commands.append(ValidateCommand)
_commands = [c.command for c in vcstool_commands]
if len(_commands) != len(set(_commands)):
raise RuntimeError(
'Multiple commands share the same command name: ' +
', '.join(sorted(_commands)))