本文整理汇总了Python中git.Commit._iter_from_process_or_stream方法的典型用法代码示例。如果您正苦于以下问题:Python Commit._iter_from_process_or_stream方法的具体用法?Python Commit._iter_from_process_or_stream怎么用?Python Commit._iter_from_process_or_stream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git.Commit
的用法示例。
在下文中一共展示了Commit._iter_from_process_or_stream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_rev_list_bisect_all
# 需要导入模块: from git import Commit [as 别名]
# 或者: from git.Commit import _iter_from_process_or_stream [as 别名]
def test_rev_list_bisect_all(self):
"""
'git rev-list --bisect-all' returns additional information
in the commit header. This test ensures that we properly parse it.
"""
revs = self.rorepo.git.rev_list('933d23bf95a5bd1624fbcdf328d904e1fa173474',
first_parent=True,
bisect_all=True)
commits = Commit._iter_from_process_or_stream(self.rorepo, StringProcessAdapter(revs.encode('ascii')))
expected_ids = (
'7156cece3c49544abb6bf7a0c218eb36646fad6d',
'1f66cfbbce58b4b552b041707a12d437cc5f400a',
'33ebe7acec14b25c5f84f35a664803fcab2f7781',
'933d23bf95a5bd1624fbcdf328d904e1fa173474'
)
for sha1, commit in zip(expected_ids, commits):
assert_equal(sha1, commit.hexsha)