~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Robert Collins
  • Date: 2005-10-07 06:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 1420.
  • Revision ID: robertc@robertcollins.net-20051007061313-9a835e979434e721
use transactions in the weave store interface, which enables caching for log

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
 
197
197
    def _copy_inventory(self, rev_id, inv_xml, parent_ids):
198
198
        self.to_control.add_text('inventory', rev_id,
199
 
                                split_lines(inv_xml), parent_ids)
 
199
                                split_lines(inv_xml), parent_ids,
 
200
                                self.to_branch.get_transaction())
200
201
 
201
202
    def _copy_new_texts(self, rev_id, inv):
202
203
        """Copy any new texts occuring in this revision."""
217
218
        if file_id in self.copied_file_ids:
218
219
            mutter('file {%s} already copied', file_id)
219
220
            return
220
 
        from_weave = self.from_weaves.get_weave(file_id)
221
 
        to_weave = self.to_weaves.get_weave_or_empty(file_id)
 
221
        from_weave = self.from_weaves.get_weave(file_id, 
 
222
            self.from_branch.get_transaction())
 
223
        to_weave = self.to_weaves.get_weave_or_empty(file_id,
 
224
            self.to_branch.get_transaction())
222
225
        to_weave.join(from_weave)
223
 
        self.to_weaves.put_weave(file_id, to_weave)
 
226
        self.to_weaves.put_weave(file_id, to_weave,
 
227
            self.to_branch.get_transaction())
224
228
        self.count_weaves += 1
225
229
        self.copied_file_ids.add(file_id)
226
230
        mutter('copied file {%s}', file_id)