[Buildbot-commits] buildbot/buildbot/changes changes.py,1.21,1.22 mail.py,1.16,1.17
Brian Warner
warner at users.sourceforge.net
Fri May 6 04:42:43 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21843/buildbot/changes
Modified Files:
changes.py mail.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-137
Creator: Brian Warner <warner at monolith.lothar.com>
Merged from org.apestaart at thomas--buildbot (patch 0-2), warner at monolith.lothar.com--2005 (patch 0-3)
Merged in Change(tag=) enhancement from Thomas Vander Stichele.
Patches applied:
* org.apestaart at thomas--buildbot/buildbot--cvstag--0-dev--base-0
tag of org.apestaart at thomas--buildbot/buildbot--cvstag--0-rel--patch-2
* org.apestaart at thomas--buildbot/buildbot--cvstag--0-dev--patch-1
tag of org.apestaart at thomas--buildbot/buildbot--cvstag--0-rel--patch-2
* org.apestaart at thomas--buildbot/buildbot--cvstag--0-rel--base-0
tag of org.apestaart at thomas--buildbot/buildbot--releases--0--patch-2
* org.apestaart at thomas--buildbot/buildbot--cvstag--0-rel--patch-1
merge in first patch on the old cvsbranch branch
* org.apestaart at thomas--buildbot/buildbot--cvstag--0-rel--patch-2
merge in complete cvsbranch to this new branch
* org.apestaart at thomas--buildbot/buildbot--releases--0--base-0
tag of arch at buildbot.sf.net--2004/buildbot--dev--0--patch-21
* org.apestaart at thomas--buildbot/buildbot--releases--0--patch-1
merge in 0.6.3 release
* org.apestaart at thomas--buildbot/buildbot--releases--0--patch-2
merge in 0.6.4 release
* org.apestaart at thomas/buildbot--cvsbranch--0--base-0
tag of org.apestaart at thomas/buildbot--releases--0.6.2--patch-2
* org.apestaart at thomas/buildbot--cvsbranch--0--patch-1
add "tag" concept to changes, and add isTagImportant to be overridden
* org.apestaart at thomas/buildbot--cvsbranch--0--patch-2
and add the file to test with
* org.apestaart at thomas/buildbot--cvsbranch--0--patch-3
clean up logging
* org.apestaart at thomas/buildbot--cvsbranch--0--patch-4
unboundlocalerror fix
* warner at monolith.lothar.com--2005/buildbot--dev--0--base-0
tag of arch at buildbot.sf.net--2004/buildbot--dev--0--patch-130
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-1
Merged from arch at buildbot.sf.net--2004 (patch 131-136)
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-2
Merged from org.apestaart at thomas--buildbot cvstag--0-dev (patch 0-2)
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-3
add some docs, document Change(tag=)
Index: changes.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/changes.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- changes.py 27 Apr 2005 20:35:27 -0000 1.21
+++ changes.py 6 May 2005 04:42:40 -0000 1.22
@@ -20,6 +20,7 @@
<p>Changed by: <b>%(who)s</b><br />
Changed at: <b>%(at)s</b><br />
%(revision)s
+%(tag)s
<br />
Changed files:
@@ -56,7 +57,7 @@
revision = None # used to create a source-stamp
def __init__(self, who, files, comments, isdir=0, links=[],
- revision=None, when=None):
+ revision=None, when=None, tag=None):
self.who = who
self.files = files
self.comments = comments
@@ -66,6 +67,7 @@
if when is None:
when = util.now()
self.when = when
+ self.tag = tag
def asText(self):
data = ""
@@ -87,11 +89,15 @@
revision = ""
if self.revision:
revision = "Revision: <b>%s</b><br />\n" % self.revision
+ tag = ""
+ if self.tag:
+ tag = "Tag: <b>%s</b><br />\n" % self.tag
kwargs = { 'who' : html.escape(self.who),
'at' : self.getTime(),
'files' : html.UL(links) + '\n',
'revision': revision,
+ 'tag' : tag,
'comments': html.PRE(self.comments) }
return html_tmpl % kwargs
@@ -185,9 +191,10 @@
def addChange(self, change):
"""Deliver a file change event. The event should be a Change object.
This method will timestamp the object as it is received."""
- log.msg("adding change, who %s, %d files, rev=%s, comments %s" %
- (change.who, len(change.files), change.revision,
- change.comments))
+ log.msg("adding change, who %s, %d files, rev=%s, tag=%s, "
+ "comments %s" % (change.who, len(change.files),
+ change.revision, change.tag,
+ change.comments))
change.number = self.nextNumber
self.nextNumber += 1
self.changes.append(change)
Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/mail.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- mail.py 24 Apr 2005 21:30:26 -0000 1.16
+++ mail.py 6 May 2005 04:42:41 -0000 1.17
@@ -126,13 +126,17 @@
files = []
comments = ""
isdir = 0
+ tag = None
+
lines = m.fp.readlines()
while lines:
line = lines.pop(0)
+
if (line == "Modified Files:\n" or
line == "Added Files:\n" or
line == "Removed Files:\n"):
break
+
while lines:
line = lines.pop(0)
if line == "\n":
@@ -147,6 +151,13 @@
# Unlike freshCVS, it makes no attempt to collect all related
# commits into a single message.
+ # note: syncmail will report a Tag underneath the ... Files: line
+ # e.g.: Tag: BRANCH-DEVEL
+
+ if line.startswith('Tag:'):
+ tag = line.split(' ')[-1].rstrip()
+ continue
+
# note: it doesn't actually make sense to use portable functions
# like os.path.join and os.sep, because these filenames all use
# separator conventions established by the remote CVS server (which
@@ -185,7 +196,7 @@
comments += line
comments = comments.rstrip() + "\n"
- change = Change(who, files, comments, isdir, when=when)
+ change = Change(who, files, comments, isdir, when=when, tag=tag)
return change
More information about the Commits
mailing list