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
|
new
|
|
| 98 | 98 | BuildRequests. This is called by a Build when it starts, to figure |
| 99 | 99 | out what its sourceStamp should be.""" |
| 100 | 100 | |
| | 101 | def getAbsoluteSourceStamp(self, got_revision): |
| | 102 | """Get a new SourceStamp object reflecting the actual revision found |
| | 103 | by a Source step.""" |
| | 104 | |
| 101 | 105 | def getText(self): |
| 102 | 106 | """Returns a list of strings to describe the stamp. These are |
| 103 | 107 | intended to be displayed in a narrow column. If more space is |
| … |
… |
|
| 255 | 259 | |
| 256 | 260 | def getSourceStamp(): |
| 257 | 261 | """Return a SourceStamp object which can be used to re-create |
| 258 | | the source tree that this build used. |
| | 262 | the source tree that this build used. This method will |
| | 263 | return an absolute SourceStamp if possible, and its results |
| | 264 | may change as the build progresses. Specifically, a "HEAD" |
| | 265 | build may later be more accurately specified by an absolute |
| | 266 | SourceStamp with the specific revision information. |
| 259 | 267 | |
| 260 | 268 | This method will return None if the source information is no longer |
| 261 | 269 | available.""" |
diff -rN -u old-trunk/buildbot/process/builder.py new-trunk/buildbot/process/builder.py
|
old
|
new
|
|
| 692 | 692 | if not bs.isFinished(): |
| 693 | 693 | return |
| 694 | 694 | |
| 695 | | ss = bs.getSourceStamp() |
| | 695 | ss = bs.getSourceStamp(absolute=True) |
| 696 | 696 | req = base.BuildRequest(reason, ss, self.original.name) |
| 697 | 697 | self.requestBuild(req) |
| 698 | 698 | |
diff -rN -u old-trunk/buildbot/sourcestamp.py new-trunk/buildbot/sourcestamp.py
|
old
|
new
|
|
| 80 | 80 | changes=changes) |
| 81 | 81 | return newsource |
| 82 | 82 | |
| | 83 | def getAbsoluteSourceStamp(self, got_revision): |
| | 84 | return SourceStamp(branch=self.branch, revision=got_revision, patch=self.patch) |
| | 85 | |
| 83 | 86 | def getText(self): |
| 84 | 87 | # TODO: this won't work for VC's with huge 'revision' strings |
| 85 | 88 | if self.revision is None: |
diff -rN -u old-trunk/buildbot/status/builder.py new-trunk/buildbot/status/builder.py
|
old
|
new
|
|
| 945 | 945 | return None |
| 946 | 946 | return self.builder.getBuild(self.number-1) |
| 947 | 947 | |
| 948 | | def getSourceStamp(self): |
| 949 | | return self.source |
| | 948 | def getSourceStamp(self, absolute=False): |
| | 949 | if not absolute or not self.properties.has_key('got_revision'): |
| | 950 | return self.source |
| | 951 | return self.source.getAbsoluteSourceStamp(self.properties['got_revision']) |
| 950 | 952 | |
| 951 | 953 | def getReason(self): |
| 952 | 954 | return self.reason |