/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Martin Pool
  • Date: 2006-05-11 08:17:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1707.
  • Revision ID: mbp@sourcefrog.net-20060511081709-2cf6b60a3d5a33fb
use the correct transaction when committing snapshot (Malone: #43959)

Without this, file merges committed in a checkout can't be properly 
pushed into the master repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
656
656
        self.text_sha1 = None
657
657
        self.executable = None
658
658
 
659
 
    def _snapshot_text(self, file_parents, work_tree, weave_store, transaction):
 
659
    def _snapshot_text(self, file_parents, work_tree, versionedfile_store, transaction):
660
660
        """See InventoryEntry._snapshot_text."""
661
 
        mutter('storing file {%s} in revision {%s}',
662
 
               self.file_id, self.revision)
 
661
        mutter('storing text of file {%s} in revision {%s} into %r',
 
662
               self.file_id, self.revision, versionedfile_store)
663
663
        # special case to avoid diffing on renames or 
664
664
        # reparenting
665
665
        if (len(file_parents) == 1
666
666
            and self.text_sha1 == file_parents.values()[0].text_sha1
667
667
            and self.text_size == file_parents.values()[0].text_size):
668
668
            previous_ie = file_parents.values()[0]
669
 
            versionedfile = weave_store.get_weave(self.file_id, transaction)
 
669
            versionedfile = versionedfile_store.get_weave(self.file_id, transaction)
670
670
            versionedfile.clone_text(self.revision, previous_ie.revision, file_parents.keys())
671
671
        else:
672
672
            new_lines = work_tree.get_file(self.file_id).readlines()
673
 
            self._add_text_to_weave(new_lines, file_parents.keys(), weave_store,
 
673
            self._add_text_to_weave(new_lines, file_parents.keys(), versionedfile_store,
674
674
                                    transaction)
675
675
            self.text_sha1 = sha_strings(new_lines)
676
676
            self.text_size = sum(map(len, new_lines))