/breezy-svn/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-svn/trunk

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: Jelmer Vernooij
  • Date: 2017-08-05 01:07:47 UTC
  • Revision ID: jelmer@jelmer.uk-20170805010747-cy4xh549a8ak6l51
More work moving to newer subvertpy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
    # remove if they no longer exist with the same name
250
250
    # or parents
251
251
    if base_tree.has_id(file_id) and base_tree.kind(file_id) == 'directory':
252
 
        for child_name, child_ie in base_tree.inventory[file_id].children.iteritems():
 
252
        for child_name, child_ie in base_tree.root_inventory[file_id].children.iteritems():
253
253
            new_child_ie = get_ie(child_ie.file_id)
254
254
            # remove if...
255
255
            if (
300
300
                changed = True
301
301
            # copy if they existed at different location
302
302
            elif (base_tree.id2path(child_ie.file_id).encode("utf-8") != new_child_path or
303
 
                    base_tree.inventory[child_ie.file_id].parent_id != child_ie.parent_id):
 
303
                    base_tree.root_inventory[child_ie.file_id].parent_id != child_ie.parent_id):
304
304
                mutter('copy %s %r -> %r', child_ie.kind,
305
305
                                  base_tree.id2path(child_ie.file_id),
306
306
                                  new_child_path)
361
361
                changed = True
362
362
            # copy if they existed at different location
363
363
            elif (base_tree.id2path(child_ie.file_id).encode("utf-8") != new_child_path or
364
 
                  base_tree.inventory[child_ie.file_id].parent_id != child_ie.parent_id):
 
364
                  base_tree.root_inventory[child_ie.file_id].parent_id != child_ie.parent_id):
365
365
                old_child_path = base_tree.id2path(child_ie.file_id).encode("utf-8")
366
366
                mutter('copy dir %r -> %r', old_child_path, new_child_path)
367
367
                copyfrom_url = url_join_unescaped_path(base_url, old_child_path)
682
682
            yield (child_ie.name, child_ie)
683
683
        # Iterate over the children that were present previously
684
684
        try:
685
 
            old_ie = self.old_tree.inventory[file_id]
 
685
            old_ie = self.old_tree.root_inventory[file_id]
686
686
        except NoSuchId:
687
687
            pass
688
688
        else:
700
700
        except KeyError:
701
701
            pass
702
702
        try:
703
 
            return self.old_tree.inventory[file_id]
 
703
            return self.old_tree.root_inventory[file_id]
704
704
        except NoSuchId:
705
705
            return None
706
706
 
942
942
        return ret
943
943
 
944
944
    def revision_tree(self):
945
 
        from breezy.inventory import mutable_inventory_from_tree
946
 
        from breezy.revisiontree import InventoryRevisionTree
 
945
        from breezy.bzr.inventory import mutable_inventory_from_tree
 
946
        from breezy.bzr.inventorytree import InventoryRevisionTree
947
947
        inv = mutable_inventory_from_tree(self.old_tree)
948
948
        revid = self._get_actual_revision_id()
949
949
        inv.apply_delta(self._get_basis_delta(revid))