Merge "model: remove unused job's BranchMatcher procedures"
This commit is contained in:
commit
b4e6247ab5
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue