[Buildbot-devel] sourcestamps, patch_info, and persistance
Dan Kegel
dank at kegel.com
Wed Sep 7 03:38:37 UTC 2011
Hi all,
I'm trying to customize the appearance of the transposed grid page to
show the patch comment, if any, after the word 'patch'.
My change worked on the first try... for current build jobs.
Once the build jobs finished, the comment disappeared;
it seems not to be persisted (not that I really understand
the persistence scheme yet). Here's my three-line change:
diff --git a/master/buildbot/sourcestamp.py b/master/buildbot/sourcestamp.py
index fb8f5a1..9aada5c 100644
--- a/master/buildbot/sourcestamp.py
+++ b/master/buildbot/sourcestamp.py
@@ -239,6 +239,8 @@ class SourceStamp(util.ComparableMixin, styles.Versioned):
result['changes'] = [c.asDict() for c in getattr(self, 'changes', [])]
result['project'] = self.project
result['repository'] = self.repository
+ if self.patch_info:
+ result['patch_comment'] = self.patch_info[1]
return result
def upgradeToVersion1(self):
diff --git a/master/buildbot/status/web/templates/grid_macros.html
b/master/buildbot/status/web/templates/grid_macros.html
index 81160fa..4e1989c 100644
--- a/master/buildbot/status/web/templates/grid_macros.html
+++ b/master/buildbot/status/web/templates/grid_macros.html
@@ -23,7 +23,7 @@
{{ ss.revision|shortrev(ss.repository) }}
{%- else %}latest{% endif %}
{%- if ss.branch %} in {{ ss.branch|e }}{% endif %}
- {%- if ss.hasPatch %} [patch]{% endif %}
+ {%- if ss.hasPatch %} [patch {{ss.patch_comment}}]{% endif %}
</td>
{%- endmacro %}
Can anyone point out how to get the sourcestamps to have
patch info even after the changes are finished building?
Thanks,
Dan
More information about the devel
mailing list