~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Martin Pool
  • Date: 2007-04-04 01:22:11 UTC
  • mfrom: (2393.1.1 bzr.docs)
  • mto: This revision was merged to the branch mainline in revision 2397.
  • Revision ID: mbp@sourcefrog.net-20070404012211-sq269me6bai9m6xk
merge trunk and doc fix from elliot

Show diffs side-by-side

added added

removed removed

Lines of Context:
563
563
                # set our support for tree references from the repository in
564
564
                # use.
565
565
                self._repo_supports_tree_reference = getattr(
566
 
                    self.branch.repository._format, "support_tree_reference",
 
566
                    self.branch.repository._format, "supports_tree_reference",
567
567
                    False)
568
568
            except:
569
569
                self._control_files.unlock()
583
583
                # set our support for tree references from the repository in
584
584
                # use.
585
585
                self._repo_supports_tree_reference = getattr(
586
 
                    self.branch.repository._format, "support_tree_reference",
 
586
                    self.branch.repository._format, "supports_tree_reference",
587
587
                    False)
588
588
            except:
589
589
                self._control_files.unlock()
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."""
1225
1229
        - uses a LockDir to guard access to it.
1226
1230
    """
1227
1231
 
 
1232
    upgrade_recommended = False
 
1233
 
1228
1234
    def get_format_string(self):
1229
1235
        """See WorkingTreeFormat.get_format_string()."""
1230
1236
        return "Bazaar Working Tree Format 4 (bzr 0.15)\n"
1256
1262
        # write out new dirstate (must exist when we create the tree)
1257
1263
        state = dirstate.DirState.initialize(local_path)
1258
1264
        state.unlock()
 
1265
        del state
1259
1266
        wt = WorkingTree4(a_bzrdir.root_transport.local_abspath('.'),
1260
1267
                         branch,
1261
1268
                         _format=self,
1263
1270
                         _control_files=control_files)
1264
1271
        wt._new_tree()
1265
1272
        wt.lock_tree_write()
1266
 
        state._validate()
 
1273
        wt.current_dirstate()._validate()
1267
1274
        try:
1268
1275
            if revision_id in (None, NULL_REVISION):
1269
1276
                wt._set_root_id(generate_ids.gen_root_id())