summaryrefslogtreecommitdiff
path: root/zuul/manager/dependent.py
diff options
context:
space:
mode:
Diffstat (limited to 'zuul/manager/dependent.py')
-rw-r--r--zuul/manager/dependent.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/zuul/manager/dependent.py b/zuul/manager/dependent.py
index 20b376d6a..5ad761196 100644
--- a/zuul/manager/dependent.py
+++ b/zuul/manager/dependent.py
@@ -141,13 +141,16 @@ class DependentPipelineManager(PipelineManager):
def enqueueChangesAhead(self, change, quiet, ignore_requirements,
change_queue, history=None):
- if history and change.number in history:
+ if history and change in history:
# detected dependency cycle
self.log.warn("Dependency cycle detected")
return False
if hasattr(change, 'number'):
history = history or []
- history.append(change.number)
+ history = history + [change]
+ else:
+ # Don't enqueue dependencies ahead of a non-change ref.
+ return True
ret = self.checkForChangesNeededBy(change, change_queue)
if ret in [True, False]: