~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Martin Pool
  • Date: 2007-04-04 01:22:11 UTC
  • mfrom: (2393.1.1 bzr.docs)
  • mto: This revision was merged to the branch mainline in revision 2397.
  • Revision ID: mbp@sourcefrog.net-20070404012211-sq269me6bai9m6xk
merge trunk and doc fix from elliot

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
            if self.file_id in inv:
194
194
                ie = inv[self.file_id]
195
195
                assert ie.file_id == self.file_id
 
196
                if ie.kind != self.kind:
 
197
                    # Can't be a candidate if the kind has changed.
 
198
                    continue
196
199
                if ie.revision in candidates:
197
200
                    # same revision value in two different inventories:
198
201
                    # correct possible inconsistencies:
491
494
        # renamed
492
495
        elif previous_ie.name != self.name:
493
496
            compatible = False
 
497
        elif previous_ie.kind != self.kind:
 
498
            compatible = False
494
499
        return compatible
495
500
 
496
501
    def _read_tree_state(self, path, work_tree):
1326
1331
            del self._byid[file_id]
1327
1332
        if ie.parent_id is not None:
1328
1333
            del self[ie.parent_id].children[ie.name]
 
1334
        else:
 
1335
            self.root = None
1329
1336
 
1330
1337
    def rename(self, file_id, new_parent_id, new_name):
1331
1338
        """Move a file within the inventory.