prepare repository...
165056
function (callback) {
            debug('');

            self.repository.on('connect', function () {
              self.emit('connect');
            });

            self.repository.on('disconnect', function () {
              self.emit('disconnect');
            });

            self.repository.connect(callback);
          }
569373
private function addRepository(
        RepositoryManager $repoManager, array &$repositories, $repoJson
    ) {
        if (isset($repoJson['type'])) {
            $this->getLogger()->info("Prepending {$repoJson['type']} repository");

            $repository = $repoManager->createRepository($repoJson['type'], $repoJson);

            $repoManager->prependRepository($repository);
            $repositories[] = $repository;
        }
    }
14678
def _prepare_disks(self, disks_name):
        """"""
        fstab = '/etc/fstab'
        for disk in tqdm(disks_name.split(',')):
            sudo('umount /dev/{0}'.format(disk), warn_only=True)
            if sudo('mkfs.xfs -f /dev/{0}'.format(disk), warn_only=True).failed:
                sudo('apt-get update')
                sudo('apt-get -y install xfsprogs')
                sudo('mkfs.xfs -f /dev/{0}'.format(disk))
            sudo('mkdir -p /srv/node/{0}'.format(disk))
            files.append(
                fstab, '/dev/{0} /srv/node/{1} xfs noatime,nodiratime,nobarrier,logbufs=8 0 2'.format(disk, disk), use_sudo=True)
            sudo('mount /srv/node/{0}'.format(disk))
1030347
@PostConstruct
    public void buildRepository() {
        try {
            LOGGER.info("Using repo config (classpath): {}", repositoryConfiguration.getURL());
            getPropertiesLoader().loadSystemProperties();

            final RepositoryConfiguration config =
                    RepositoryConfiguration.read(repositoryConfiguration.getURL());
            repository = modeShapeEngine.deploy(config);

            // next line ensures that repository starts before the factory is used.
            final org.modeshape.common.collection.Problems problems =
                    repository.getStartupProblems();
            for (final org.modeshape.common.collection.Problem p : problems) {
                LOGGER.error("ModeShape Start Problem: {}", p.getMessageString());
                // TODO determine problems that should be runtime errors
            }
        } catch (final Exception e) {
            throw new RepositoryRuntimeException(e);
        }
    }
722720
def create_repository(self):
        """"""
        repo = repository.Repository(
            self.repository_config['repository'],
            self.username,
            self.password,
            self.disable_progress_bar
        )
        repo.set_certificate_authority(self.cacert)
        repo.set_client_certificate(self.client_cert)
        return repo
733544
async def repository(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["repository"], *args, **kwargs)
406102
def _set_repo(self, url):
        """"""
        if url.startswith('http'):
            try:
                self.repo = Proxy(url)
            except ProxyError, e:
                log.exception('Error setting repo: %s' % url)
                raise GritError(e)
        else:
            try:
                self.repo = Local(url)
            except NotGitRepository:
                raise GritError('Invalid url: %s' % url)
            except Exception, e:
                log.exception('Error setting repo: %s' % url)
                raise GritError(e)
385115
def initialize_repo(self):
        

        logging.info('Repo {} doesn\'t exist. Cloning...'.format(self.repo_dir))
        clone_args = ['git', 'clone']
        if self.depth and self.depth > 0:
            clone_args.extend(['--depth', str(self.depth)])
        clone_args.extend(['--branch', self.branch_name])
        clone_args.extend([self.git_url, self.repo_dir])
        yield from execute_cmd(clone_args)
        yield from execute_cmd(['git', 'config', 'user.email', 'nbgitpuller@example.com'], cwd=self.repo_dir)
        yield from execute_cmd(['git', 'config', 'user.name', 'nbgitpuller'], cwd=self.repo_dir)
        logging.info('Repo {} initialized'.format(self.repo_dir))
338299
public function setRepository()
    {
        $this->repository = app()->make(PageRepositoryInterface::class);
        $this->repository
            ->pushCriteria(\Litepie\Repository\Criteria\RequestCriteria::class)
            ->pushCriteria(\Litecms\Page\Repositories\Criteria\PageResourceCriteria::class);
    }
738589
def main(argv=None):
    """"""
    if argv is None:
        argv = sys.argv[1:]
    usage = '\n\n\n'.join(__doc__.split('\n\n\n')[1:])
    version = 'Gitpress ' + __version__

    # Parse options
    args = docopt(usage, argv=argv, version=version)

    # Execute command
    try:
        return execute(args)
    except RepositoryNotFoundError as ex:
        error('No Gitpress repository found at', ex.directory)
1180131
def prepare(self):
    
    self.src_folder = self.get_src_folder()
    st = os.stat('%s/gradlew' % self.path)
    os.chmod('%s/gradlew' % self.path, st.st_mode | stat.S_IEXEC)
559294
protected function createMigrationRepository(): void
    {
        $repository = $this->migrator->getRepository();

        if (! $repository->repositoryExists()) {
            $repository->createRepository();
        }
    }
267257
def _prepare_workdir(self):
    """"""
    pants_jar_base_dir = os.path.join(self.versioned_workdir, 'cache')
    safe_mkdir(pants_jar_base_dir)
    return pants_jar_base_dir
756227
def generate_repo_files(self, release):
        """"""
        repo_tmpl = pkg_resources.resource_string(__name__, 'templates/repo.mako')
        repo_file = os.path.join(release['git_dir'], '%s.repo' % release['repo'])
        with file(repo_file, 'w') as repo:
            repo_out = Template(repo_tmpl).render(**release)
            self.log.debug('Writing repo file %s:\n%s', repo_file, repo_out)
            repo.write(repo_out)
        self.log.info('Wrote repo configuration to %s', repo_file)
1321934
def execute(args):
    """"""

    def info(*message):
        """Displays a message unless -q was specified."""
        if not args['-q']:
            print ' '.join(map(str, message))

    if args['init']:
        try:
            repo = init(args['<directory>'])
            info('Initialized Gitpress repository in', repo)
        except RepositoryAlreadyExistsError as ex:
            info('Gitpress repository already exists in', ex.repo)
        return 0

    if args['preview']:
        directory, address = resolve(args['<directory>'], args['<address>'])
        host, port = split_address(address)
        if address and not host and not port:
            error('Invalid address', repr(address))
        return preview(directory, host=host, port=port)

    if args['build']:
        require_repo(args['<directory>'])
        info('Building site', os.path.abspath(args['<directory>'] or '.'))
        try:
            out_directory = build(args['<directory>'], args['--out'])
        except NotADirectoryError as ex:
            error(ex)
        info('Site built in', os.path.abspath(out_directory))
        return 0

    if args['themes']:
        theme = args['<theme>']
        if args['use']:
            try:
                switched = use_theme(theme)
            except ConfigSchemaError as ex:
                error('Could not modify config:', ex)
                return 1
            except ThemeNotFoundError as ex:
                error('Theme %s is not currently installed.' % repr(theme))
                return 1
            info('Switched to theme %s' if switched else 'Already using %s' % repr(theme))
        elif args['install']:
            # TODO: implement
            raise NotImplementedError()
        elif args['uninstall']:
            # TODO: implement
            raise NotImplementedError()
        else:
            themes = list_themes()
            if themes:
                info('Installed themes:')
                info('  ' + '\n  '.join(themes))
            else:
                info('No themes installed.')
        return 0

    if args['plugins']:
        plugin = args['<plugin>']
        if args['add']:
            try:
                added = add_plugin(plugin)
            except ConfigSchemaError as ex:
                error('Could not modify config:', ex)
                return 1
            info(('Added plugin %s' if added else
                'Plugin %s has already been added.') % repr(plugin))
        elif args['remove']:
            settings = get_plugin_settings(plugin)
            if not args['-f'] and settings and isinstance(settings, dict):
                warning = 'Plugin %s contains settings. Remove?' % repr(plugin)
                if not yes_or_no(warning):
                    return 0
            try:
                removed = remove_plugin(plugin)
            except ConfigSchemaError as ex:
                error('Error: Could not modify config:', ex)
            info(('Removed plugin %s' if removed else
                'Plugin %s has already been removed.') % repr(plugin))
        else:
            plugins = list_plugins()
            info('Installed plugins:\n  ' + '\n  '.join(plugins) if plugins else
                'No plugins installed.')
        return 0

    return 1
278091
def prepare(self):
        ''''''
        self.__make_scubadir()

        if self.is_remote_docker:
            '''
            Docker is running remotely (e.g. boot2docker on OSX).
            We don't need to do any user setup whatsoever.

            TODO: For now, remote instances won't have any .scubainit

            See:
            https://github.com/JonathonReinhart/scuba/issues/17
            '''
            raise ScubaError('Remote docker not supported (DOCKER_HOST is set)')

        # Docker is running natively
        self.__setup_native_run()

        # Apply environment vars from .scuba.yml
        self.env_vars.update(self.context.environment)
744834
async function renovateRepository(repoConfig) {
  let config = { ...repoConfig };
  logger.setMeta({ repository: config.repository });
  logger.info('Renovating repository');
  logger.trace({ config });
  let repoResult;
  try {
    await fs.ensureDir(config.localDir);
    logger.debug('Using localDir: ' + config.localDir);
    config = await initRepo(config);
    const { res, branches, branchList, packageFiles } = await processRepo(
      config
    );
    await ensureOnboardingPr(config, packageFiles, branches);
    await ensureMasterIssue(config, branches);
    await finaliseRepo(config, branchList);
    repoResult = processResult(config, res);
  } catch (err) /*  */ {
    const errorRes = await handleError(config, err);
    repoResult = processResult(config, errorRes);
  }
  await platform.cleanRepo();
  if (config.localDir && !config.persistRepoData) {
    await fs.remove(config.localDir);
  }
  logger.info('Finished repository');
  return repoResult;
}