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


Python Jagare.create_branch方法代码示例

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


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

示例1: test_merge_commits

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import create_branch [as 别名]
    def test_merge_commits(self):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        path = self.get_temp_path()

        # repo has work-tree
        repo.clone(path, branch=BARE_REPO_OTHER_BRANCH)
        repo = Jagare(os.path.join(path, '.git'))

        ret = repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret

        commit_something(path, branch=BR)
        repo.update_head(BARE_REPO_OTHER_BRANCH)
        merge_index = repo.merge_commits(repo.head.target.hex, BR)
        assert merge_index['has_conflicts'] == False
开发者ID:CMGS,项目名称:ellen,代码行数:18,代码来源:test_merge.py

示例2: test_merge_head

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import create_branch [as 别名]
    def test_merge_head(self):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        path = self.get_temp_path()

        # repo has work-tree
        repo.clone(path, branch=BARE_REPO_OTHER_BRANCH)
        repo = Jagare(os.path.join(path, '.git'))

        ret = repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret

        commit_something(path, branch=BR)
        repo.update_head(BARE_REPO_OTHER_BRANCH)
        merge_result = repo.merge_head(BR)
        assert merge_result['is_fastforward']
开发者ID:CMGS,项目名称:ellen,代码行数:18,代码来源:test_merge.py

示例3: _merge

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import create_branch [as 别名]
    def _merge(self, no_ff):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        path = self.get_temp_path()

        # repo has work-tree
        repo.clone(path, branch=BARE_REPO_OTHER_BRANCH)
        repo = Jagare(os.path.join(path, '.git'))

        ret = repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret
        sha1 = repo.sha(BARE_REPO_OTHER_BRANCH)

        commit_something(path, branch=BR)
        repo.update_head(BARE_REPO_OTHER_BRANCH)
        ret = repo.merge(BR, no_ff=no_ff)
        sha2 = repo.sha(BARE_REPO_OTHER_BRANCH)

        assert sha1 != sha2
        assert repo.sha(sha1) == sha1
开发者ID:CMGS,项目名称:ellen,代码行数:22,代码来源:test_merge.py

示例4: test_create

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import create_branch [as 别名]
 def test_create(self):
     repo = Jagare(self.path)
     repo.create_branch('br_test', 'master')
     assert repo.sha('br_test') == repo.sha('master')
开发者ID:CMGS,项目名称:ellen,代码行数:6,代码来源:test_branch.py

示例5: create_branch

# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import create_branch [as 别名]
 def create_branch(self, path, name, ref, force):
     try:
         repo = Jagare(path)
         return repo.create_branch(name, ref, force)
     except Exception as e:
         raise ServiceUnavailable(repr(e))
开发者ID:tclh123,项目名称:jagare-rpc,代码行数:8,代码来源:jagare_handler.py


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