Merge in default: bug 651104 production-0.8 FIREFOX_3_5_19_BUILD2 FIREFOX_3_5_19_RELEASE FIREFOX_3_6_17_BUILD3 FIREFOX_3_6_17_RELEASE FIREFOX_5_0b1_BUILD1 FIREFOX_5_0b1_RELEASE
authorChris AtLee <catlee@mozilla.com>
Tue, 19 Apr 2011 10:48:52 -0400
branchproduction-0.8
changeset 183 509eed75bf25f2d9c28575e4075b10bfd5d01c36
parent 173 aa65fddf81ca11684505fa59673fe14a505a3432 (current diff)
parent 182 55622e8d8131dcfb112a1de246c6331fa7de83a2 (diff)
child 191 abdecc098fe076b8f9b7dcb3761ce43e823fdb33
push id80
push usercatlee@mozilla.com
push dateTue, 19 Apr 2011 14:49:14 +0000
bugs651104
Merge in default: bug 651104
--- a/.hgtags
+++ b/.hgtags
@@ -54,8 +54,17 @@ a63f228167508513dfc019b4968c3cd24ecc5321
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_4_0rc2_RELEASE
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_4_0rc2_BUILD3
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_4_0_RELEASE
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_4_0_RELEASE
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_3_6_16_RELEASE
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_3_6_16_BUILD1
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_3_5_18_RELEASE
 a63f228167508513dfc019b4968c3cd24ecc5321 FIREFOX_3_5_18_BUILD1
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_4_0_1_RELEASE
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_4_0_1_BUILD1
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_6_17_RELEASE
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_6_17_BUILD1
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_6_17_RELEASE
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_6_17_RELEASE
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_6_17_BUILD2
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_5_19_RELEASE
+aa65fddf81ca11684505fa59673fe14a505a3432 FIREFOX_3_5_19_BUILD1
--- a/master/buildbot/test/unit/test_util_ComparableMixin.py
+++ b/master/buildbot/test/unit/test_util_ComparableMixin.py
@@ -41,13 +41,18 @@ class ComparableMixin(unittest.TestCase)
         self.assertNotEqual(self.f123, self.f134)
 
     def test_inequality_importantDifferences_subclass(self):
         self.assertNotEqual(self.b123, self.b213)
 
     def test_inequality_differentClasses(self):
         self.assertNotEqual(self.f123, self.b123)
 
+    def test_inequality_sameClass_differentCompareAttrs(self):
+        another_f123 = self.Foo(1, 2, 3)
+        another_f123.compare_attrs = ["b", "a"]
+        self.assertNotEqual(self.f123, another_f123)
+
     def test_lt_importantDifferences(self):
         assert self.f123 < self.f134
 
     def test_lt_differentClasses(self):
         assert self.b123 < self.f123
--- a/master/buildbot/util/__init__.py
+++ b/master/buildbot/util/__init__.py
@@ -58,17 +58,20 @@ class ComparableMixin:
         result = cmp(type(self), type(them))
         if result:
             return result
 
         result = cmp(self.__class__.__name__, them.__class__.__name__)
         if result:
             return result
 
-        assert self.compare_attrs == them.compare_attrs
+        result = cmp(self.compare_attrs, them.compare_attrs)
+        if result:
+            return result
+
         self_list = [getattr(self, name, self._None)
                      for name in self.compare_attrs]
         them_list = [getattr(them, name, self._None)
                      for name in self.compare_attrs]
         return cmp(self_list, them_list)
 
 # Remove potentially harmful characters from builder name if it is to be
 # used as the build dir.