Rev 2269: Implement __ne__ for some types. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5

Jelmer Vernooij jelmer at samba.org
Tue Dec 16 01:57:46 GMT 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.5

------------------------------------------------------------
revno: 2269
revision-id: jelmer at samba.org-20081216015744-ke3oy2gzhpjovp16
parent: jelmer at samba.org-20081216012633-hsasmt3ur22p54t7
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Tue 2008-12-16 02:57:44 +0100
message:
  Implement __ne__ for some types.
modified:
  logwalker.py                   logwalker.py-20060621215743-c13fhfnyzh1xzwh2-1
  mapping2.py                    mapping.py-20080904055555-lw057kjuadn0r2ma-2
  mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
  mapping3/scheme.py             scheme.py-20060516195850-95181aae6b272f9e
  mapping4.py                    mapping4.py-20080827182338-y4xzpsf43vyiwcir-1
  revmeta.py                     revmeta.py-20080901215045-n8a6arqybs9ez5hl-1
=== modified file 'logwalker.py'
--- a/logwalker.py	2008-12-14 02:51:46 +0000
+++ b/logwalker.py	2008-12-16 01:57:44 +0000
@@ -117,6 +117,10 @@
         self._ensure_init()
         return self.dict.__eq__(other)
 
+    def __ne__(self, other):
+        self._ensure_init()
+        return self.dict.__ne__(other)
+
     def update(self, other):
         self._ensure_init()
         return self.dict.update(other)

=== modified file 'mapping2.py'
--- a/mapping2.py	2008-12-07 23:25:07 +0000
+++ b/mapping2.py	2008-12-16 01:57:44 +0000
@@ -65,6 +65,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def __ne__(self, other):
+        return type(self) != type(other)
+
     def __hash__(self):
         return hash(type(self))
 
@@ -154,6 +157,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def __ne__(self, other):
+        return type(self) != type(other)
+
     def __hash__(self):
         return hash(type(self))
 

=== modified file 'mapping3/__init__.py'
--- a/mapping3/__init__.py	2008-12-07 18:05:41 +0000
+++ b/mapping3/__init__.py	2008-12-16 01:57:44 +0000
@@ -186,6 +186,9 @@
     def __eq__(self, other):
         return (type(self) == type(other) and self.name == other.name)
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def __hash__(self):
         return hash((type(self), self.name))
 
@@ -298,6 +301,9 @@
     def __eq__(self, other):
         return type(self) == type(other) and self.scheme == other.scheme
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def __str__(self):
         return "%s(%s)" % (self.__class__.__name__, repr(self.scheme))
 

=== modified file 'mapping3/scheme.py'
--- a/mapping3/scheme.py	2008-11-18 17:33:18 +0000
+++ b/mapping3/scheme.py	2008-12-16 01:57:44 +0000
@@ -222,6 +222,9 @@
         return (self.branch_list == other.branch_list and \
                 self.tag_list == other.tag_list)
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def to_lines(self):
         return self.branch_list
 

=== modified file 'mapping4.py'
--- a/mapping4.py	2008-12-07 20:36:39 +0000
+++ b/mapping4.py	2008-12-16 01:57:44 +0000
@@ -42,6 +42,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def __ne__(self, other):
+        return type(self) != type(other)
+
     def __hash__(self):
         return hash(type(self))
 
@@ -87,6 +90,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def __ne__(self, other):
+        return type(self) != type(other)
+
     def get_lhs_parent_fileprops(self, fileprops):
         return None
 

=== modified file 'revmeta.py'
--- a/revmeta.py	2008-12-08 02:55:09 +0000
+++ b/revmeta.py	2008-12-16 01:57:44 +0000
@@ -135,6 +135,9 @@
         return (type(self) == type(other) and 
                 self.get_foreign_revid() == other.get_foreign_revid())
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def __cmp__(self, other):
         return cmp((self.uuid, self.revnum, self.branch_path),
                    (other.uuid, other.revnum, other.branch_path))
@@ -833,6 +836,9 @@
                 ((self._revs == [] and other._revs == []) or 
                  (self._revs != [] and other._revs != [] and self._revs[0] == other._revs[0])))
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def __hash__(self):
         if len(self._revs) == 0:
             return hash((type(self), self._history_limit))
@@ -919,6 +925,9 @@
                 self.prefixes == other.prefixes and
                 self.layout == other.layout)
 
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
     def __hash__(self):
         return hash((type(self), self.from_revnum, self.to_revnum, tuple(self.prefixes), hash(self.layout)))
 




More information about the bazaar-commits mailing list