本文整理汇总了Python中ellen.repo.Jagare.merge_tree方法的典型用法代码示例。如果您正苦于以下问题:Python Jagare.merge_tree方法的具体用法?Python Jagare.merge_tree怎么用?Python Jagare.merge_tree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ellen.repo.Jagare
的用法示例。
在下文中一共展示了Jagare.merge_tree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: merge_commits
# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import merge_tree [as 别名]
def merge_commits(self, path, ours, theirs):
try:
repo = Jagare(path)
ret = repo.merge_tree(ours, theirs)
return MergeIndexConverter(**ret).convert()
except Exception as e:
raise ServiceUnavailable(repr(e))
示例2: test_merge_tree
# 需要导入模块: from ellen.repo import Jagare [as 别名]
# 或者: from ellen.repo.Jagare import merge_tree [as 别名]
def test_merge_tree(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)
index = repo.merge_tree(repo.head.target.hex, BR)
assert index['has_conflicts'] == False