Changeset - e45f8cefd7d9
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-04-08 20:38:37
marcin@python-works.com
implement __ne__
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/base.py
Show inline comments
 
@@ -81,12 +81,15 @@ class BaseRepository(object):
 
        return self.count()
 

	
 
    def __eq__(self, other):
 
        same_instance = isinstance(other, self.__class__)
 
        return same_instance and getattr(other, 'path', None) == self.path
 

	
 
    def __ne__(self, other):
 
        return not self.__eq__(other)
 

	
 
    @LazyProperty
 
    def alias(self):
 
        for k, v in settings.BACKENDS.items():
 
            if v.split('.')[-1] == str(self.__class__.__name__):
 
                return k
 

	
0 comments (0 inline, 0 general)