~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

(mbp) more integrated 0.15 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
809
809
                                     size=cur_details[2],
810
810
                                     to_block=to_block,
811
811
                                     to_key=to_key,
812
 
                                     to_path_utf8=to_rel_utf8)
 
812
                                     to_path_utf8=to_path_utf8)
813
813
                            if minikind == 'd':
814
814
                                # We need to move all the children of this
815
815
                                # entry
1202
1202
            for file_id in file_ids:
1203
1203
                self._inventory.remove_recursive_id(file_id)
1204
1204
 
 
1205
    @needs_read_lock
 
1206
    def _validate(self):
 
1207
        self._dirstate._validate()
 
1208
 
1205
1209
    @needs_tree_write_lock
1206
1210
    def _write_inventory(self, inv):
1207
1211
        """Write inventory as the current inventory."""
1258
1262
        # write out new dirstate (must exist when we create the tree)
1259
1263
        state = dirstate.DirState.initialize(local_path)
1260
1264
        state.unlock()
 
1265
        del state
1261
1266
        wt = WorkingTree4(a_bzrdir.root_transport.local_abspath('.'),
1262
1267
                         branch,
1263
1268
                         _format=self,
1265
1270
                         _control_files=control_files)
1266
1271
        wt._new_tree()
1267
1272
        wt.lock_tree_write()
1268
 
        state._validate()
 
1273
        wt.current_dirstate()._validate()
1269
1274
        try:
1270
1275
            if revision_id in (None, NULL_REVISION):
1271
1276
                wt._set_root_id(generate_ids.gen_root_id())