~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Robert Collins
  • Date: 2006-03-07 02:18:45 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060307021845-571917c17fce6b30
Remove the commit and rollback transaction methods as misleading, and implement a WriteTransaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
413
413
        :return: a dictionary of revision_id->revision_parents_list.
414
414
        """
415
415
        weave = self.get_inventory_weave()
416
 
        all_revisions = self._eliminate_revisions_not_present(weave.names())
417
 
        entire_graph = dict([(node, weave.parent_names(node)) for 
 
416
        all_revisions = self._eliminate_revisions_not_present(weave.versions())
 
417
        entire_graph = dict([(node, weave.get_parents(node)) for 
418
418
                             node in all_revisions])
419
419
        if revision_id is None:
420
420
            return entire_graph
1105
1105
            repo_transport.clone('revision-store'),
1106
1106
            file_mode = control_files._file_mode,
1107
1107
            prefixed=False,
 
1108
            precious=True,
1108
1109
            versionedfile_class=KnitVersionedFile)
1109
1110
        return KnitRevisionStore(versioned_file_store)
1110
1111
 
1141
1142
        repo_transport = a_bzrdir.get_repository_transport(None)
1142
1143
        control_files = LockableFiles(repo_transport, 'lock')
1143
1144
        control_store = self._get_control_store(repo_transport, control_files)
 
1145
        # trigger a write of the inventory store.
1144
1146
        control_store.get_weave_or_empty('inventory',
1145
1147
            bzrlib.transactions.PassThroughTransaction())
1146
1148
        return self.open(a_bzrdir=a_bzrdir, _found=True)
1349
1351
                self.target.weave_store.copy_all_ids(
1350
1352
                    self.source.weave_store,
1351
1353
                    pb=pb,
1352
 
                    from_transaction=self.source.get_transaction())
 
1354
                    from_transaction=self.source.get_transaction(),
 
1355
                    to_transaction=self.target.get_transaction())
1353
1356
                pb.update('copying inventory', 0, 1)
1354
1357
                self.target.control_weaves.copy_multi(
1355
1358
                    self.source.control_weaves, ['inventory'],
1356
 
                    from_transaction=self.source.get_transaction())
 
1359
                    from_transaction=self.source.get_transaction(),
 
1360
                    to_transaction=self.target.get_transaction())
1357
1361
                self.target._revision_store.text_store.copy_all_ids(
1358
1362
                    self.source._revision_store.text_store,
1359
1363
                    pb=pb)