~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mutabletree.py

  • Committer: Vincent Ladeuil
  • Date: 2012-02-14 17:22:37 UTC
  • mfrom: (6466 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120214172237-7dv7er3n4uy8d5m4
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
        :seealso Inventory.apply_delta: For details on the changes parameter.
409
409
        """
410
410
        self.flush()
411
 
        inv = self.inventory
 
411
        inv = self.root_inventory
412
412
        inv.apply_delta(changes)
413
413
        self._write_inventory(inv)
414
414
 
520
520
            "called with a bzrlib.mutabletree.PostCommitHookParams object. "
521
521
            "The mutable tree the commit was performed on is available via "
522
522
            "the mutable_tree attribute of that object.", (2, 0))
523
 
 
 
523
        self.add_hook('pre_transform',
 
524
            "Called before a tree transform on this tree. The hook is called "
 
525
            "with the tree that is being transformed and the transform.",
 
526
            (2, 5))
 
527
        self.add_hook('post_build_tree',
 
528
            "Called after a completely new tree is built. The hook is "
 
529
            "called with the tree as its only argument.", (2, 5))
 
530
        self.add_hook('post_transform',
 
531
            "Called after a tree transform has been performed on a tree. "
 
532
            "The hook is called with the tree that is being transformed and "
 
533
            "the transform.",
 
534
            (2, 5))
524
535
 
525
536
# install the default hooks into the MutableTree class.
526
537
MutableTree.hooks = MutableTreeHooks()
612
623
            # nb: this relies on someone else checking that the path we're using
613
624
            # doesn't contain symlinks.
614
625
            parent_ie = self._convert_to_directory(parent_ie, inv_dirname)
615
 
        file_id = self.action(self.tree.inventory, parent_ie, path, kind)
 
626
        file_id = self.action(self.tree, parent_ie, path, kind)
616
627
        entry = _mod_inventory.make_entry(kind, basename, parent_ie.file_id,
617
628
            file_id=file_id)
618
629
        self._invdelta[inv_path] = (None, inv_path, entry.file_id, entry)