~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Robert Collins
  • Date: 2006-03-01 08:40:35 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060301084035-ce00abd11fe4da31
Change weave store to be a versioned store, using WeaveFiles which maintain integrity without needing explicit 'put' operations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                 'revision']
120
120
 
121
121
    def _add_text_to_weave(self, new_lines, parents, weave_store, transaction):
122
 
        weave_store.add_text(self.file_id, self.revision, new_lines, parents,
123
 
                             transaction)
 
122
        versionedfile = weave_store.get_weave(self.file_id, transaction)
 
123
        versionedfile.add_lines(self.revision, parents, new_lines)
124
124
 
125
125
    def detect_changes(self, old_entry):
126
126
        """Return a (text_modified, meta_modified) from this to old_entry.
587
587
            and self.text_sha1 == file_parents.values()[0].text_sha1
588
588
            and self.text_size == file_parents.values()[0].text_size):
589
589
            previous_ie = file_parents.values()[0]
590
 
            weave_store.add_identical_text(
591
 
                self.file_id, previous_ie.revision, 
592
 
                self.revision, file_parents, transaction)
 
590
            versionedfile = weave_store.get_weave(self.file_id, transaction)
 
591
            versionedfile.clone_text(self.revision, previous_ie.revision, file_parents)
593
592
        else:
594
593
            new_lines = work_tree.get_file(self.file_id).readlines()
595
594
            self._add_text_to_weave(new_lines, file_parents, weave_store,