git.samba.org
/
jelmer
/
dulwich-libgit2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f53d542
)
Implement ShaFile.__ne__.
author
Jelmer Vernooij
<jelmer@samba.org>
Tue, 9 Jun 2009 20:53:03 +0000
(22:53 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Tue, 9 Jun 2009 20:53:03 +0000
(22:53 +0200)
dulwich/objects.py
patch
|
blob
|
history
diff --git
a/dulwich/objects.py
b/dulwich/objects.py
index a4c7bfbac39c2893b30e8b659c7f184d57ee3e75..928366a5c2dbb6f985ed835de77e3e7814289a2e 100644
(file)
--- a/
dulwich/objects.py
+++ b/
dulwich/objects.py
@@
-226,6
+226,9
@@
class ShaFile(object):
def __repr__(self):
return "<%s %s>" % (self.__class__.__name__, self.id)
+
+ def __ne__(self, other):
+ return self.id != other.id
def __eq__(self, other):
"""Return true id the sha of the two objects match.
@@
-233,7
+236,7
@@
class ShaFile(object):
The __le__ etc methods aren't overriden as they make no sense,
certainly at this level.
"""
- return self.
sha().digest() == other.sha().digest()
+ return self.
id == other.id
class Blob(ShaFile):