[Buildbot-commits] buildbot/buildbot/changes changes.py,1.23,1.24 mail.py,1.18,1.19

Brian Warner warner at users.sourceforge.net
Wed May 18 07:49:32 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9801/buildbot/changes

Modified Files:
	changes.py mail.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-209
Creator:  Brian Warner <warner at monolith.lothar.com>

rename Change(tag=) to branch=

	* buildbot/changes/changes.py: rename tag= to branch=, since
	that's how we're using it, and my design for the upcoming "build a
	specific branch" feature wants it. also, tag= was too CVS-centric
	* buildbot/changes/mail.py (parseSyncmail): same
	* buildbot/process/base.py (Build.isBranchImportant): same
	* buildbot/test/test_mailparse.py (Test3.testMsgS4): same
	* docs/buildbot.texinfo (Attributes of Changes): same

	* NEWS: update tag=, update for upcoming release


Index: changes.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/changes.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- changes.py	17 May 2005 10:14:09 -0000	1.23
+++ changes.py	18 May 2005 07:49:29 -0000	1.24
@@ -20,8 +20,8 @@
 html_tmpl = """
 <p>Changed by: <b>%(who)s</b><br />
 Changed at: <b>%(at)s</b><br />
+%(branch)s
 %(revision)s
-%(tag)s
 <br />
 
 Changed files:
@@ -62,7 +62,7 @@
     revision = None # used to create a source-stamp
 
     def __init__(self, who, files, comments, isdir=0, links=[],
-                 revision=None, when=None, tag=None):
+                 revision=None, when=None, branch=None):
         self.who = who
         self.files = files
         self.comments = comments
@@ -72,7 +72,7 @@
         if when is None:
             when = util.now()
         self.when = when
-        self.tag = tag
+        self.branch = branch
 
     def asText(self):
         data = ""
@@ -94,15 +94,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
+        branch = ""
+        if self.branch:
+            branch = "Branch: <b>%s</b><br />\n" % self.branch
 
         kwargs = { 'who'     : html.escape(self.who),
                    'at'      : self.getTime(),
                    'files'   : html.UL(links) + '\n',
                    'revision': revision,
-                   'tag'     : tag,
+                   'branch'  : branch,
                    'comments': html.PRE(self.comments) }
         return html_tmpl % kwargs
 
@@ -163,9 +163,9 @@
         seconds if not.  It parses incoming mail to determine what files
         were changed.
 
-       - L{buildbot.changes.freshcvs.FreshCVSSource} makes a PB
-         connection to the CVSToys 'freshcvs' daemon and relays any
-         changes it announces.
+      - L{buildbot.changes.freshcvs.FreshCVSSource} makes a PB
+        connection to the CVSToys 'freshcvs' daemon and relays any
+        changes it announces.
     
     """
 
@@ -196,9 +196,9 @@
     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, tag=%s, "
+        log.msg("adding change, who %s, %d files, rev=%s, branch=%s, "
                 "comments %s" % (change.who, len(change.files),
-                                 change.revision, change.tag,
+                                 change.revision, change.branch,
                                  change.comments))
         change.number = self.nextNumber
         self.nextNumber += 1

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/mail.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- mail.py	17 May 2005 10:14:09 -0000	1.18
+++ mail.py	18 May 2005 07:49:29 -0000	1.19
@@ -125,7 +125,7 @@
     files = []
     comments = ""
     isdir = 0
-    tag = None
+    branch = None
 
     lines = m.fp.readlines()
     while lines:
@@ -154,7 +154,7 @@
         # e.g.:       Tag: BRANCH-DEVEL
 
         if line.startswith('Tag:'):
-            tag = line.split(' ')[-1].rstrip()
+            branch = line.split(' ')[-1].rstrip()
             continue
 
         # note: it doesn't actually make sense to use portable functions
@@ -195,7 +195,8 @@
         comments += line
     comments = comments.rstrip() + "\n"
     
-    change = changes.Change(who, files, comments, isdir, when=when, tag=tag)
+    change = changes.Change(who, files, comments, isdir, when=when,
+                            branch=branch)
 
     return change
 





More information about the Commits mailing list