Fix ref comparison.
In the case of ref deletion, the null sha is not very unique, and could be present in another project. Make sure to compare the project, ref, and sha to determine if two ref-updated events are equal. Change-Id: I6bd4a02f21bd31b91ef369783641ded014f7717c Reviewed-on: https://review.openstack.org/13839 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
9b670905d9
commit
9358c615f9
@ -507,7 +507,9 @@ class Ref(Changeish):
|
||||
return self.newrev
|
||||
|
||||
def equals(self, other):
|
||||
if self.ref == other.ref and self.newrev == other.newrev:
|
||||
if (self.project == other.project
|
||||
and self.ref == other.ref
|
||||
and self.newrev == other.newrev):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user