• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python hg.apply_and_push函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中util.hg.apply_and_push函数的典型用法代码示例。如果您正苦于以下问题:Python apply_and_push函数的具体用法?Python apply_and_push怎么用?Python apply_and_push使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: testApplyAndPush

    def testApplyAndPush(self):
        clone(self.repodir, self.wc)

        def c(repo, attempt):
            run_cmd(['hg', 'tag', '-f', 'TEST'], cwd=repo)
        apply_and_push(self.wc, self.repodir, c)
        self.assertEquals(getRevisions(self.wc), getRevisions(self.repodir))
开发者ID:bdacode,项目名称:build-tools,代码行数:7,代码来源:test_util_hg.py


示例2: tag_repo

def tag_repo(workdir, branch, tags, pushRepo, hg_username,
             hg_ssh_key):
    def tag_and_push(repo, attempt):
        update(workdir, branch)
        tag(workdir, tags, rev=branch, force=True, user=hg_username)
        log.info("Tagged %s, attempt #%s" % (repo, attempt))

    apply_and_push(workdir, pushRepo, tag_and_push,
                   ssh_username=hg_username, ssh_key=hg_ssh_key)
开发者ID:magnyld,项目名称:build-tools,代码行数:9,代码来源:release-runner.py


示例3: testApplyAndPushRebaseFails

 def testApplyAndPushRebaseFails(self):
     clone(self.repodir, self.wc)
     def c(repo, attempt, remote):
         run_cmd(['hg', 'tag', '-f', 'TEST'], cwd=repo)
         if attempt in (1,2):
             run_cmd(['hg', 'tag', '-f', 'CONFLICTING_TAG'], cwd=remote)
     apply_and_push(self.wc, self.repodir,
                    lambda r, a: c(r, a, self.repodir), max_attempts=3)
     self.assertEquals(getRevisions(self.wc), getRevisions(self.repodir))
开发者ID:EkkiD,项目名称:build-tools,代码行数:9,代码来源:test_util_hg.py


示例4: testApplyAndPushWithRebase

 def testApplyAndPushWithRebase(self):
     clone(self.repodir, self.wc)
     def c(repo, attempt, remote):
         run_cmd(['hg', 'tag', '-f', 'TEST'], cwd=repo)
         if attempt == 1:
             run_cmd(['hg', 'rm', 'hello.txt'], cwd=remote)
             run_cmd(['hg', 'commit', '-m', 'test'], cwd=remote)
     apply_and_push(self.wc, self.repodir,
                    lambda r, a: c(r, a, self.repodir), max_attempts=2)
     self.assertEquals(getRevisions(self.wc), getRevisions(self.repodir))
开发者ID:EkkiD,项目名称:build-tools,代码行数:10,代码来源:test_util_hg.py


示例5: testApplyAndPushWithRebase

    def testApplyAndPushWithRebase(self):
        clone(self.repodir, self.wc)

        def c(repo, attempt, remote):
            run_cmd(["hg", "tag", "-f", "TEST"], cwd=repo)
            if attempt == 1:
                run_cmd(["hg", "rm", "hello.txt"], cwd=remote)
                run_cmd(["hg", "commit", "-m", "test"], cwd=remote)

        apply_and_push(self.wc, self.repodir, lambda r, a: c(r, a, self.repodir), max_attempts=2)
        self.assertEquals(getRevisions(self.wc), getRevisions(self.repodir))
开发者ID:B-Rich,项目名称:build-tools,代码行数:11,代码来源:test_util_hg.py


示例6: testApplyAndPushForce

 def testApplyAndPushForce(self):
     clone(self.repodir, self.wc)
     def c(repo, attempt, remote, local):
         run_cmd(['touch', 'newfile'], cwd=remote)
         run_cmd(['hg', 'add', 'newfile'], cwd=remote)
         run_cmd(['hg', 'commit', '-m', '"add newfile"'], cwd=remote)
         run_cmd(['touch', 'newfile'], cwd=local)
         run_cmd(['hg', 'add', 'newfile'], cwd=local)
         run_cmd(['hg', 'commit', '-m', '"re-add newfile"'], cwd=local)
     apply_and_push(self.wc, self.repodir,
             (lambda r, a: c(r, a, self.repodir, self.wc)), force=True)
开发者ID:EkkiD,项目名称:build-tools,代码行数:11,代码来源:test_util_hg.py


示例7: testApplyAndPushForce

    def testApplyAndPushForce(self):
        clone(self.repodir, self.wc)

        def c(repo, attempt, remote, local):
            run_cmd(["touch", "newfile"], cwd=remote)
            run_cmd(["hg", "add", "newfile"], cwd=remote)
            run_cmd(["hg", "commit", "-m", '"add newfile"'], cwd=remote)
            run_cmd(["touch", "newfile"], cwd=local)
            run_cmd(["hg", "add", "newfile"], cwd=local)
            run_cmd(["hg", "commit", "-m", '"re-add newfile"'], cwd=local)

        apply_and_push(self.wc, self.repodir, (lambda r, a: c(r, a, self.repodir, self.wc)), force=True)
开发者ID:B-Rich,项目名称:build-tools,代码行数:12,代码来源:test_util_hg.py


示例8: import_and_push

def import_and_push(repo, bug, branch_name, patch_ids, patches_dir,
                    add_try_commit, try_syntax, pull_repo, push_repo,
                    ssh_username, ssh_key):

    def changer(repo, attempt):
        log.debug("Importing patches, attemp #%s", attempt)
        import_patches(bug=bug, branch_name=branch_name, patch_ids=patch_ids,
                       patches_dir=patches_dir, repo=repo,
                       add_try_commit=add_try_commit,
                       pull_repo=pull_repo, try_syntax=try_syntax)

    setup_repo(repo=repo, pull_repo=pull_repo)
    apply_and_push(localrepo=repo, remote=push_repo, changer=changer,
                   max_attempts=10, ssh_username=ssh_username, ssh_key=ssh_key,
                   force=False)
    return get_revision(repo)
开发者ID:rail,项目名称:build-autoland,代码行数:16,代码来源:mercurial.py


示例9: get_release_sanity_args

            rs_args = get_release_sanity_args(configs_workdir, release,
                                              cfgFile, masters_json,
                                              buildbot_configs_branch)
            release_sanity_script = "%s/buildbot-helpers/release_sanity.py" % tools_workdir
            run_cmd(['python', release_sanity_script] + rs_args +
                    ['--dry-run'])
            rr.update_status(
                release, 'Waiting for other releases to run release sanity'
            )

    try:
        # Pushing doesn't happen until _after_ release sanity has been run
        # for all releases to minimize the chance of bad configs being
        # pushed. apply_and_push calls process_configs, and if it returns
        # successfully, it pushes all of the changes that it made.
        apply_and_push(configs_workdir, configs_pushRepo, process_configs,
                       ssh_username=hg_username, ssh_key=hg_ssh_key)

        # Now that we know that all of the configs are good, we can tag
        # the other repositories
        for release in rr.new_releases:
            rr.update_status(release, 'Tagging other repositories')
        tag_repo(workdir=custom_workdir, branch=buildbotcustom_branch,
                 tags=tags, pushRepo=custom_pushRepo,
                 hg_username=hg_username, hg_ssh_key=hg_ssh_key)
        tag_repo(workdir=tools_workdir, branch=tools_branch, tags=tags,
                 pushRepo=tools_pushRepo,
                 hg_username=hg_username, hg_ssh_key=hg_ssh_key)
        for release in rr.new_releases:
            rr.update_status(release, 'Reconfiging masters')

        # Reconfig the masters and configure the warning callback, if present.
开发者ID:magnyld,项目名称:build-tools,代码行数:32,代码来源:release-runner.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python hg.clone函数代码示例发布时间:2022-05-26
下一篇:
Python helper.getDirname函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap