Mercurial > kallithea
comparison rhodecode/lib/vcs/backends/base.py @ 3713:e45f8cefd7d9 beta
implement __ne__
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 08 Apr 2013 20:38:37 +0200 |
parents | 5f9f4ece4b52 |
children | 600ffde2634c |
comparison
equal
deleted
inserted
replaced
3712:08cf7741e5e1 | 3713:e45f8cefd7d9 |
---|---|
81 return self.count() | 81 return self.count() |
82 | 82 |
83 def __eq__(self, other): | 83 def __eq__(self, other): |
84 same_instance = isinstance(other, self.__class__) | 84 same_instance = isinstance(other, self.__class__) |
85 return same_instance and getattr(other, 'path', None) == self.path | 85 return same_instance and getattr(other, 'path', None) == self.path |
86 | |
87 def __ne__(self, other): | |
88 return not self.__eq__(other) | |
86 | 89 |
87 @LazyProperty | 90 @LazyProperty |
88 def alias(self): | 91 def alias(self): |
89 for k, v in settings.BACKENDS.items(): | 92 for k, v in settings.BACKENDS.items(): |
90 if v.split('.')[-1] == str(self.__class__.__name__): | 93 if v.split('.')[-1] == str(self.__class__.__name__): |