~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.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:
103
103
                 'text_id', 'parent_id', 'children',
104
104
                 'text_version', 'entry_version', ]
105
105
 
 
106
 
106
107
    def __init__(self, file_id, name, kind, parent_id, text_id=None):
107
108
        """Create an InventoryEntry
108
109
        
122
123
        if '/' in name or '\\' in name:
123
124
            raise BzrCheckError('InventoryEntry name %r is invalid' % name)
124
125
        
 
126
        self.text_version = None
 
127
        self.entry_version = None
125
128
        self.text_sha1 = None
126
129
        self.text_size = None
127
 
    
128
130
        self.file_id = file_id
129
131
        self.name = name
130
132
        self.kind = kind
174
176
               and (self.text_size == other.text_size) \
175
177
               and (self.text_id == other.text_id) \
176
178
               and (self.parent_id == other.parent_id) \
177
 
               and (self.kind == other.kind)
 
179
               and (self.kind == other.kind) \
 
180
               and (self.text_version == other.text_version) \
 
181
               and (self.entry_version == other.entry_version)
178
182
 
179
183
 
180
184
    def __ne__(self, other):