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