def add(self, br): BuildRun.add(self, br) authors = br.authors - self.exclude_authors if authors: for auth in authors: if auth not in self.uses_try_chooser: self.uses_try_chooser[auth] = False if 'try:' in br.comments: self.used_trychooser = True self.uses_try_chooser[auth] = True
def to_dict(self, summary=False): json_obj = BuildRun.to_dict(self, summary=summary) json_obj.update({ 'uses_try_chooser': self.uses_try_chooser, # the authors 'used_trychooser': self.used_trychooser, # true / false }) return json_obj
def __init__(self, revision, branch_name): BuildRun.__init__(self, revision, branch_name) self.uses_try_chooser = {} # author: boolean (uses try) self.used_trychooser = False self.exclude_authors = set(['sendchange', 'sendchange-unittest'])