当前位置: 首页>>代码示例>>Python>>正文


Python Repository.identify_repository_type方法代码示例

本文整理汇总了Python中repository.Repository.identify_repository_type方法的典型用法代码示例。如果您正苦于以下问题:Python Repository.identify_repository_type方法的具体用法?Python Repository.identify_repository_type怎么用?Python Repository.identify_repository_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在repository.Repository的用法示例。


在下文中一共展示了Repository.identify_repository_type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: int

# 需要导入模块: from repository import Repository [as 别名]
# 或者: from repository.Repository import identify_repository_type [as 别名]
            log_data['run_extra_targets'] = job['run_extra_targets']
            log_data['test_locales'] = job['test_locales']

            log_data['start_time'] = int(time.time())
            current_time = time.strftime("%Y-%m-%d_%H%M%S", time.localtime(log_data['start_time']))
            log_data['start_time_local'] = current_time
            log_data['is_buildfarm'] = True


            # create a repository instance
            repository = Repository(config, database, log_data['repository'], config.get('cache-dir'))
            # do not update the repository again, assume that all necessary updates were fetched during job creation
            repository.handle_update(False, log_data)
            # from here on a local copy of the repository is available

            log_data['repository_type'] = repository.identify_repository_type(repository.full_path)

            logging.info("repository: " + log_data['repository'])
            if (log_data['is_head'] == 1):
                logging.info("building branch/revision: " + log_data['branch'] + '/' + log_data['revision'] + ' (HEAD)')
            else:
                logging.info("building branch/revision: " + log_data['branch'] + '/' + log_data['revision'])


            build_dir_name = str(current_time).replace('-', '') + '_bf_' + log_data['branch']

            # the config module ensures that all necessary --run-* options are set
            build_dir = repository.copy_repository(build_dir_name, log_data['branch'], log_data['revision'])

            build = Build(config, repository, build_dir)
开发者ID:andreasscherbaum,项目名称:buildfarm-client,代码行数:32,代码来源:buildclient.py


注:本文中的repository.Repository.identify_repository_type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。