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


Python Jagare.merge_flow方法代码示例

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


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

示例1: merge_flow

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import merge_flow [as 别名]
    def merge_flow(self, path, merger_name, merger_email,
                   message_header, message_body,
                   from_repo_path, from_ref, to_ref,
                   remote_name, no_ff):
        """merge with worktree(tmpdir)"""
        try:
            repo = Jagare(path)
            with get_tmpdir() as tmpdir:

                assert tmpdir

                ret = repo.merge_flow(merger_name, merger_email,
                                      message_header, message_body, tmpdir,
                                      from_repo_path, from_ref, to_ref,
                                      remote_name=remote_name, no_ff=no_ff)

                assert ret

            return ret
        except Exception as e:
            raise ServiceUnavailable(repr(e))
开发者ID:tclh123,项目名称:jagare-rpc,代码行数:23,代码来源:jagare_handler.py

示例2: test_merge_flow

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import merge_flow [as 别名]
    def test_merge_flow(self):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        sha1 = repo.sha(BARE_REPO_OTHER_BRANCH)

        from_repo_path = self.get_temp_path()
        from_repo = repo.clone(from_repo_path, branch=BARE_REPO_OTHER_BRANCH,
                               bare=True)
        ret = from_repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret
        commit_something(from_repo_path, branch=BR)

        tmpdir = self.get_temp_path()

        # different repo
        sha = repo.merge_flow('lh', '[email protected]',
                              'test_header', 'test_body', tmpdir,
                              from_repo_path, BR, BARE_REPO_OTHER_BRANCH,
                              remote_name='hub/xxxproject', no_ff=True)
        assert sha

        sha2 = repo.sha(BARE_REPO_OTHER_BRANCH)

        assert sha1 != sha2
        assert repo.sha(sha1) == sha1

        # same repo
        tmpdir2 = self.get_temp_path()
        from_sha1 = from_repo.sha(BARE_REPO_OTHER_BRANCH)
        assert from_sha1 == sha1
        sha = from_repo.merge_flow('lh', '[email protected]',
                                   'test_header', 'test_body', tmpdir2,
                                   from_repo_path, BR, BARE_REPO_OTHER_BRANCH,
                                   no_ff=True)
        assert sha
        from_sha2 = from_repo.sha(BARE_REPO_OTHER_BRANCH)
        assert from_sha1 != from_sha2
        assert from_repo.sha(from_sha1) == from_sha1
开发者ID:tclh123,项目名称:ellen,代码行数:40,代码来源:test_merge.py


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