~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_3.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:
36
36
    )
37
37
from bzrlib.lockable_files import LockableFiles
38
38
from bzrlib.lockdir import LockDir
 
39
from bzrlib.mutabletree import MutableTree
39
40
from bzrlib.transport.local import LocalTransport
40
41
from bzrlib.workingtree import (
41
42
    InventoryWorkingTree,
220
221
        try:
221
222
            basis_tree = branch.repository.revision_tree(revision_id)
222
223
            # only set an explicit root id if there is one to set.
223
 
            if basis_tree.inventory.root is not None:
 
224
            if basis_tree.get_root_id() is not None:
224
225
                wt.set_root_id(basis_tree.get_root_id())
225
226
            if revision_id == _mod_revision.NULL_REVISION:
226
227
                wt.set_parent_trees([])
227
228
            else:
228
229
                wt.set_parent_trees([(revision_id, basis_tree)])
229
230
            transform.build_tree(basis_tree, wt)
 
231
            for hook in MutableTree.hooks['post_build_tree']:
 
232
                hook(wt)
230
233
        finally:
231
234
            # Unlock in this order so that the unlock-triggers-flush in
232
235
            # WorkingTree is given a chance to fire.