Skip to content

Commit

Permalink
Merge branch 'NightlySchedFixes' of git://github.com/garetharmstrongh…
Browse files Browse the repository at this point in the history
…p/buildbot

* 'NightlySchedFixes' of git://github.com/garetharmstronghp/buildbot:
  Fixes buildbot#823 - Nightly scheduler is not tracking changes when onlyIfChanged is True

Signed-off-by: Dustin J. Mitchell <dustin@zmanda.com>
  • Loading branch information
Dustin J. Mitchell committed May 6, 2010
2 parents f1f5969 + b7abcfb commit eeb57f2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions buildbot/schedulers/timed.py
Expand Up @@ -50,6 +50,13 @@ def start_HEAD_build(self, t):
ssid = db.get_sourcestampid(ss, t)
self.create_buildset(ssid, self.reason, t)

def start_requested_build(self, t, relevant_changes):
# start a build with the requested list of changes on self.branch
db = self.parent.db
ss = SourceStamp(branch=self.branch, changes=relevant_changes)
ssid = db.get_sourcestampid(ss, t)
self.create_buildset(ssid, self.reason, t)

def update_last_build(self, t, when):
# and record when we did it
state = self.get_state(t)
Expand Down Expand Up @@ -249,9 +256,11 @@ def _maybe_start_build(self, t):
log.msg("Nightly Scheduler <%s>: "
"skipping build - No important change" % self.name)
return
self.start_HEAD_build(t)
relevant_changes = [c for c in (important + unimportant) if
c.branch == self.branch]
self.start_requested_build(t, relevant_changes)
# retire the changes
changeids = [c.number for c in (important + unimportant)]
changeids = [c.number for c in relevant_changes]
db.scheduler_retire_changes(self.schedulerid, changeids, t)
else:
# start it unconditionally
Expand Down

0 comments on commit eeb57f2

Please sign in to comment.