summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Cacqueray <tdecacqu@redhat.com>2019-01-29 01:52:57 +0000
committerTristan Cacqueray <tdecacqu@redhat.com>2019-01-29 01:56:56 +0000
commit0ec52de95b2179ddef90499f204ec5ec0fdd921a (patch)
treec3f27bcafbb4ad8f0786b1e4baf493d77b7614f6
parent91e7e680a16dc17469195029750a0a3231586c10 (diff)
model: remove unused job's BranchMatcher procedures
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 01 Feb 2019 01:07:36 +0000 Reviewed-on: https://review.openstack.org/633643 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--zuul/model.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/zuul/model.py b/zuul/model.py
index e7cff08..ac589c2 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -1316,29 +1316,6 @@ class Job(ConfigObject):
1316 matchers.append(change_matcher.FileMatcher(fn)) 1316 matchers.append(change_matcher.FileMatcher(fn))
1317 self.irrelevant_file_matcher = change_matcher.MatchAllFiles(matchers) 1317 self.irrelevant_file_matcher = change_matcher.MatchAllFiles(matchers)
1318 1318
1319 def getSimpleBranchMatcher(self):
1320 # If the job has a simple branch matcher, return it; otherwise None.
1321 if not self.branch_matcher:
1322 return None
1323 m = self.branch_matcher
1324 if not isinstance(m, change_matcher.AbstractMatcherCollection):
1325 return None
1326 if len(m.matchers) != 1:
1327 return None
1328 m = m.matchers[0]
1329 if not isinstance(m, change_matcher.BranchMatcher):
1330 return None
1331 return m
1332
1333 def addImpliedBranchMatcher(self, branch):
1334 # Add a branch matcher that combines as a boolean *and* with
1335 # existing branch matchers, if any.
1336 self._implied_branch = branch
1337 matchers = [change_matcher.ImpliedBranchMatcher(branch)]
1338 if self.branch_matcher:
1339 matchers.append(self.branch_matcher)
1340 self.branch_matcher = change_matcher.MatchAll(matchers)
1341
1342 def updateVariables(self, other_vars, other_extra_vars, other_host_vars, 1319 def updateVariables(self, other_vars, other_extra_vars, other_host_vars,
1343 other_group_vars): 1320 other_group_vars):
1344 if other_vars is not None: 1321 if other_vars is not None: