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
diff --git a/zuul/model.py b/zuul/model.py
index c6841c5..56d2d29 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -507,7 +507,9 @@
         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