Skip to content

Commit

Permalink
always return new (cloned) objects if absolute sourcestamps have been…
Browse files Browse the repository at this point in the history
… requested
  • Loading branch information
hborkhuis committed May 8, 2012
1 parent 9995410 commit 8946eba
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions master/buildbot/status/build.py
Expand Up @@ -98,16 +98,20 @@ def getAllGotRevisions(self):

def getSourceStamps(self, absolute=False):
sourcestamps = []
all_got_revisions = self.getAllGotRevisions()
if not absolute or not all_got_revisions:
if not absolute:
sourcestamps.extend(self.sources)
else:
all_got_revisions = self.getAllGotRevisions()
# always make a new instance
for ss in self.sources:
if ss.codebase in all_got_revisions:
got_revision = all_got_revisions[ss.codebase]
sourcestamps.append(ss.getAbsoluteSourceStamp(got_revision))
else:
sourcestamps.append(ss)
# No absolute revision information available
# Probably build has been stopped before ending all sourcesteps
# Return a clone with original revision
sourcestamps.append(ss.clone())
return sourcestamps

def getReason(self):
Expand Down

0 comments on commit 8946eba

Please sign in to comment.