Ticket #71: update-sourcestamps.patch
| File update-sourcestamps.patch, 3.5 KB (added by dustin, 5 years ago) |
|---|
-
buildbot/interfaces.py
Patch to allow SourceStamps to be updated from an "original" SourceStamp (based on a set of Changes) to a "specific" SourceStamp (with an explicit revision). Default functionality of BuildStatus.getSourceStamp() is not altered.
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 getUpdatedSourceStamp(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 … … 346 350 347 351 def getSourceStamp(): 348 352 """Return a SourceStamp object which can be used to re-create 349 the source tree that this build used. 353 the source tree that this build used. This method will 354 return the most specific information possible, and its results 355 may change as the build progresses. Specifically, a "HEAD" 356 build may later be more accurately specified with the specific 357 revision information. 350 358 351 359 This method will return None if the source information is no longer 352 360 available.""" -
buildbot/sourcestamp.py
old new 80 80 changes=changes) 81 81 return newsource 82 82 83 def getUpdatedSourceStamp(self, got_revision): 84 return SourceStamp(branch=self.branch, revision=got_revision, patch=self.patch) 85 83 86 def getText(self): 84 87 # XXX this won't work for VC's with huge 'revision' strings 85 88 if self.revision is None: return [ "latest" ] -
buildbot/status/builder.py
old new 951 951 return None 952 952 return self.builder.getBuild(self.number-1) 953 953 954 def getSourceStamp(self): 955 return self.source 954 def getSourceStamp(self, specific=False): 955 if not specific or not self.properties.has_key('got_revision'): 956 return self.source 957 return self.source.getUpdatedSourceStamp(self.properties['got_revision']) 956 958 957 959 def getReason(self): 958 960 return self.reason -
buildbot/process/builder.py
old new 672 672 return 673 673 674 674 # get a source stamp, possibly more specific than the original 675 ss = bs.getSourceStamp() 676 changes = bs.getChanges() 677 ss = sourcestamp.SourceStamp(ss.branch, ss.revision, ss.patch, changes) 675 ss = bs.getSourceStamp(specific=True) 678 676 679 677 req = base.BuildRequest(reason, ss, self.original.name) 680 678 self.requestBuild(req)
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)