~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Robert Collins
  • Date: 2005-09-30 04:52:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050930045210-1f157d2aaaa73c63
convert name_version to revision in inventory entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    parent_id
59
59
        file_id of the parent directory, or ROOT_ID
60
60
 
61
 
    name_version
 
61
    revision
62
62
        the revision_id in which the name or parent of this file was
63
63
        last changed
64
64
 
116
116
    
117
117
    __slots__ = ['text_sha1', 'text_size', 'file_id', 'name', 'kind',
118
118
                 'text_id', 'parent_id', 'children',
119
 
                 'text_version', 'name_version', 'symlink_target']
 
119
                 'text_version', 'revision', 'symlink_target']
120
120
 
121
121
    def compatible_for_commit(self, previous_ie):
122
122
        compatible = True
152
152
            raise BzrCheckError('InventoryEntry name %r is invalid' % name)
153
153
        
154
154
        self.text_version = None
155
 
        self.name_version = None
 
155
        self.revision = None
156
156
        self.text_sha1 = None
157
157
        self.text_size = None
158
158
        self.file_id = file_id
232
232
        other.text_size = self.text_size
233
233
        other.symlink_target = self.symlink_target
234
234
        other.text_version = self.text_version
235
 
        other.name_version = self.name_version
 
235
        other.revision = self.revision
236
236
        # note that children are *not* copied; they're pulled across when
237
237
        # others are added
238
238
        return other
259
259
               and (self.parent_id == other.parent_id) \
260
260
               and (self.kind == other.kind) \
261
261
               and (self.text_version == other.text_version) \
262
 
               and (self.name_version == other.name_version)
 
262
               and (self.revision == other.revision)
263
263
 
264
264
    def __ne__(self, other):
265
265
        return not (self == other)