Sun Jan 13 21:14:02 EST 2008  dustin@zmanda.com
  * absolute-sourcestamps.patch
diff -rN -u old-trunk/buildbot/interfaces.py new-trunk/buildbot/interfaces.py
--- old-trunk/buildbot/interfaces.py	2008-01-13 21:15:15.807256802 -0500
+++ new-trunk/buildbot/interfaces.py	2008-01-13 21:15:15.835255791 -0500
@@ -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."""
diff -rN -u old-trunk/buildbot/process/builder.py new-trunk/buildbot/process/builder.py
--- old-trunk/buildbot/process/builder.py	2008-01-13 21:15:15.807256802 -0500
+++ new-trunk/buildbot/process/builder.py	2008-01-13 21:15:15.839255647 -0500
@@ -692,7 +692,7 @@
         if not bs.isFinished():
             return
 
-        ss = bs.getSourceStamp()
+        ss = bs.getSourceStamp(absolute=True)
         req = base.BuildRequest(reason, ss, self.original.name)
         self.requestBuild(req)
 
diff -rN -u old-trunk/buildbot/sourcestamp.py new-trunk/buildbot/sourcestamp.py
--- old-trunk/buildbot/sourcestamp.py	2008-01-13 21:15:15.807256802 -0500
+++ new-trunk/buildbot/sourcestamp.py	2008-01-13 21:15:15.843255503 -0500
@@ -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:
diff -rN -u old-trunk/buildbot/status/builder.py new-trunk/buildbot/status/builder.py
--- old-trunk/buildbot/status/builder.py	2008-01-13 21:15:15.807256802 -0500
+++ new-trunk/buildbot/status/builder.py	2008-01-13 21:15:15.843255503 -0500
@@ -945,8 +945,10 @@
             return None
         return self.builder.getBuild(self.number-1)
 
-    def getSourceStamp(self):
-        return self.source
+    def getSourceStamp(self, absolute=False):
+        if not absolute or not self.properties.has_key('got_revision'):
+            return self.source
+        return self.source.getAbsoluteSourceStamp(self.properties['got_revision'])
 
     def getReason(self):
         return self.reason


