本文整理汇总了Python中webkitpy.common.checkout.changelog.ChangeLog.parse_latest_entry_from_file方法的典型用法代码示例。如果您正苦于以下问题:Python ChangeLog.parse_latest_entry_from_file方法的具体用法?Python ChangeLog.parse_latest_entry_from_file怎么用?Python ChangeLog.parse_latest_entry_from_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.common.checkout.changelog.ChangeLog
的用法示例。
在下文中一共展示了ChangeLog.parse_latest_entry_from_file方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _latest_entry_for_changelog_at_revision
# 需要导入模块: from webkitpy.common.checkout.changelog import ChangeLog [as 别名]
# 或者: from webkitpy.common.checkout.changelog.ChangeLog import parse_latest_entry_from_file [as 别名]
def _latest_entry_for_changelog_at_revision(self, changelog_path, revision):
changelog_contents = self._scm.contents_at_revision(changelog_path, revision)
# contents_at_revision returns a byte array (str()), but we know
# that ChangeLog files are utf-8. parse_latest_entry_from_file
# expects a file-like object which vends unicode(), so we decode here.
changelog_file = StringIO.StringIO(changelog_contents.decode("utf-8"))
return ChangeLog.parse_latest_entry_from_file(changelog_file)
示例2: _latest_entry_for_changelog_at_revision
# 需要导入模块: from webkitpy.common.checkout.changelog import ChangeLog [as 别名]
# 或者: from webkitpy.common.checkout.changelog.ChangeLog import parse_latest_entry_from_file [as 别名]
def _latest_entry_for_changelog_at_revision(self, changelog_path, revision):
changelog_contents = self._scm.contents_at_revision(changelog_path, revision)
# contents_at_revision returns a byte array (str()), but we know
# that ChangeLog files are utf-8. parse_latest_entry_from_file
# expects a file-like object which vends unicode(), so we decode here.
# Old revisions of Sources/WebKit/wx/ChangeLog have some invalid utf8 characters.
changelog_file = StringIO.StringIO(changelog_contents.decode("utf-8", "ignore"))
return ChangeLog.parse_latest_entry_from_file(changelog_file)
示例3: _latest_entry_for_changelog_at_revision
# 需要导入模块: from webkitpy.common.checkout.changelog import ChangeLog [as 别名]
# 或者: from webkitpy.common.checkout.changelog.ChangeLog import parse_latest_entry_from_file [as 别名]
def _latest_entry_for_changelog_at_revision(self, changelog_path, revision):
changelog_contents = self._scm.contents_at_revision(changelog_path, revision)
return ChangeLog.parse_latest_entry_from_file(StringIO.StringIO(changelog_contents))