~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Martin Pool
  • Date: 2005-09-06 07:26:13 UTC
  • Revision ID: mbp@sourcefrog.net-20050906072613-1a4a18769aaaa3eb
- add xml round-trip test for revisions

- fix up __eq__ method for Revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    def __repr__(self):
71
71
        return "<Revision id %s>" % self.revision_id
72
72
 
 
73
    def __eq__(self, other):
 
74
        if not isinstance(other, Revision):
 
75
            return False
 
76
        return (self.inventory_id == other.inventory_id
 
77
                and self.inventory_sha1 == other.inventory_sha1
 
78
                and self.revision_id == other.revision_id
 
79
                and self.timestamp == other.timestamp
 
80
                and self.message == other.message
 
81
                and self.timezone == other.timezone
 
82
                and self.committer == other.committer)
 
83
 
 
84
    def __ne__(self, other):
 
85
        return not self.__eq__(other)
 
86
 
73
87
        
74
88
 
75
89
REVISION_ID_RE = None