model: remove unused job's BranchMatcher procedures

Change-Id: Ifb0ec00541c3251c322b052a5b50c6f79e09d28e
This commit is contained in:
Tristan Cacqueray 2019-01-29 01:52:57 +00:00
parent 91e7e680a1
commit 0ec52de95b
1 changed files with 0 additions and 23 deletions

View File

@ -1316,29 +1316,6 @@ class Job(ConfigObject):
matchers.append(change_matcher.FileMatcher(fn))
self.irrelevant_file_matcher = change_matcher.MatchAllFiles(matchers)
def getSimpleBranchMatcher(self):
# If the job has a simple branch matcher, return it; otherwise None.
if not self.branch_matcher:
return None
m = self.branch_matcher
if not isinstance(m, change_matcher.AbstractMatcherCollection):
return None
if len(m.matchers) != 1:
return None
m = m.matchers[0]
if not isinstance(m, change_matcher.BranchMatcher):
return None
return m
def addImpliedBranchMatcher(self, branch):
# Add a branch matcher that combines as a boolean *and* with
# existing branch matchers, if any.
self._implied_branch = branch
matchers = [change_matcher.ImpliedBranchMatcher(branch)]
if self.branch_matcher:
matchers.append(self.branch_matcher)
self.branch_matcher = change_matcher.MatchAll(matchers)
def updateVariables(self, other_vars, other_extra_vars, other_host_vars,
other_group_vars):
if other_vars is not None: