⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes.py

📁 The BuildBot is a system to automate the compile/test cycle required by most software projects. CVS
💻 PY
字号:
from zope.interface import implementsfrom twisted.python import componentsfrom twisted.web.error import NoResourcefrom buildbot.changes.changes import Changefrom buildbot.status.web.base import HtmlResource, StaticHTML, IBox, Box# /changes/NNclass ChangesResource(HtmlResource):    def body(self, req):        data = ""        data += "Change sources:\n"        sources = self.getStatus(req).getChangeSources()        if sources:            data += "<ol>\n"            for s in sources:                data += "<li>%s</li>\n" % s.describe()            data += "</ol>\n"        else:            data += "none (push only)\n"        return data    def getChild(self, path, req):        num = int(path)        c = self.getStatus(req).getChange(num)        if not c:            return NoResource("No change number '%d'" % num)        return StaticHTML(c.asHTML(), "Change #%d" % num)class ChangeBox(components.Adapter):    implements(IBox)    def getBox(self, req):        url = req.childLink("../changes/%d" % self.original.number)        text = self.original.get_HTML_box(url)        return Box([text], class_="Change")components.registerAdapter(ChangeBox, Change, IBox)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -