/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2019-08-11 13:21:03 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7388.
  • Revision ID: jelmer@jelmer.uk-20190811132103-u3ne03yf37c1h57n
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
            branch = a_controldir.open_branch()
98
98
        if revision_id is None:
99
99
            revision_id = _mod_revision.ensure_null(branch.last_revision())
100
 
        branch.lock_write()
101
 
        try:
 
100
        with branch.lock_write():
102
101
            branch.generate_revision_history(revision_id)
103
 
        finally:
104
 
            branch.unlock()
105
102
        inv = inventory.Inventory()
106
103
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
107
104
                          branch,
111
108
                          _controldir=a_controldir,
112
109
                          _control_files=branch.control_files)
113
110
        basis_tree = branch.repository.revision_tree(revision_id)
114
 
        if basis_tree.get_root_id() is not None:
115
 
            wt.set_root_id(basis_tree.get_root_id())
 
111
        if basis_tree.path2id('') is not None:
 
112
            wt.set_root_id(basis_tree.path2id(''))
116
113
        # set the parent list and cache the basis tree.
117
114
        if _mod_revision.is_null(revision_id):
118
115
            parent_trees = []