[Buildbot-commits] buildbot/buildbot interfaces.py, 1.64, 1.65 sourcestamp.py, 1.5, 1.6

Brian Warner warner at users.sourceforge.net
Tue Mar 18 22:25:57 UTC 2008


Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18032/buildbot

Modified Files:
	interfaces.py sourcestamp.py 
Log Message:
[project @ #71:absolute-sourcestamps.patch]
Allow sourcestamps to be made "absolute" by replacing generic "latest"
sourcestamps with specific revisions.

Original author: dustin at v.igoro.us
Date: 2008-02-17 01:54:44+00:00

Index: interfaces.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- interfaces.py	30 Sep 2007 18:48:12 -0000	1.64
+++ interfaces.py	18 Mar 2008 22:25:55 -0000	1.65
@@ -98,6 +98,10 @@
         BuildRequests. This is called by a Build when it starts, to figure
         out what its sourceStamp should be."""
 
+    def getAbsoluteSourceStamp(self, got_revision):
+        """Get a new SourceStamp object reflecting the actual revision found
+        by a Source step."""
+
     def getText(self):
         """Returns a list of strings to describe the stamp. These are
         intended to be displayed in a narrow column. If more space is
@@ -255,7 +259,11 @@
 
     def getSourceStamp():
         """Return a SourceStamp object which can be used to re-create
-        the source tree that this build used.
+        the source tree that this build used.  This method will
+        return an absolute SourceStamp if possible, and its results
+        may change as the build progresses.  Specifically, a "HEAD"
+        build may later be more accurately specified by an absolute
+        SourceStamp with the specific revision information.
 
         This method will return None if the source information is no longer
         available."""

Index: sourcestamp.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/sourcestamp.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sourcestamp.py	1 Aug 2007 20:31:43 -0000	1.5
+++ sourcestamp.py	18 Mar 2008 22:25:55 -0000	1.6
@@ -80,6 +80,9 @@
                                 changes=changes)
         return newsource
 
+    def getAbsoluteSourceStamp(self, got_revision):
+        return SourceStamp(branch=self.branch, revision=got_revision, patch=self.patch)
+
     def getText(self):
         # TODO: this won't work for VC's with huge 'revision' strings
         if self.revision is None:





More information about the Commits mailing list