~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/workingtree.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Weave-era working tree objects."""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
from cStringIO import StringIO
20
22
 
21
23
from bzrlib import (
28
30
    xml5,
29
31
    )
30
32
from bzrlib.decorators import needs_read_lock
 
33
from bzrlib.mutabletree import MutableTree
31
34
from bzrlib.transport.local import LocalTransport
32
35
from bzrlib.workingtree import (
33
36
    WorkingTreeFormat,
102
105
                         _bzrdir=a_bzrdir,
103
106
                         _control_files=branch.control_files)
104
107
        basis_tree = branch.repository.revision_tree(revision_id)
105
 
        if basis_tree.inventory.root is not None:
 
108
        if basis_tree.get_root_id() is not None:
106
109
            wt.set_root_id(basis_tree.get_root_id())
107
110
        # set the parent list and cache the basis tree.
108
111
        if _mod_revision.is_null(revision_id):
111
114
            parent_trees = [(revision_id, basis_tree)]
112
115
        wt.set_parent_trees(parent_trees)
113
116
        transform.build_tree(basis_tree, wt)
 
117
        for hook in MutableTree.hooks['post_build_tree']:
 
118
            hook(wt)
114
119
        return wt
115
120
 
116
121
    def __init__(self):