當前位置: 首頁>>代碼示例>>Python>>正文


Python Repository.repository_head方法代碼示例

本文整理匯總了Python中repository.Repository.repository_head方法的典型用法代碼示例。如果您正苦於以下問題:Python Repository.repository_head方法的具體用法?Python Repository.repository_head怎麽用?Python Repository.repository_head使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在repository.Repository的用法示例。


在下文中一共展示了Repository.repository_head方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Repository

# 需要導入模塊: from repository import Repository [as 別名]
# 或者: from repository.Repository import repository_head [as 別名]
    # from here on, only one repository is possible
    # create a repository instance
    repository = Repository(config, database, config.get('repository-url'), config.get('cache-dir'))
    repository.handle_update(True, log_data)
    # from here on a local copy of the repository is available

    # create a list of all jobs
    jobs = []
    for branch in config.get('build-branch'):
        job = {}
        job['added_ts'] = int(time.time())
        job['repository'] = config.get('repository-url')
        job['repository_type'] = repository.repository_type
        job['branch'] = branch
        if (config.get('build-revision') == 'HEAD'):
            job['revision'] = repository.repository_head(repository.full_path, branch)
            job['is_head'] = True
        else:
            job['revision'] = config.get('build-revision')
            job['is_head'] = False

        job['extra-configure'] = config.get('extra-configure')
        job['extra-make'] = config.get('extra-make')
        job['extra-install'] = config.get('extra-install')
        job['extra-tests'] = config.get('extra-tests')
        job['run-extra-targets'] = config.get('test-extra-targets')
        job['test-locales'] = config.get('test-locales')

        # create one job with Orca=off in any case, just to ensure that we test this case
        job['orca'] = False
        jobs.append(job)
開發者ID:andreasscherbaum,項目名稱:buildfarm-client,代碼行數:33,代碼來源:buildclient.py


注:本文中的repository.Repository.repository_head方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。