本文整理匯總了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))