~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Robert Collins
  • Date: 2008-04-08 03:39:43 UTC
  • mto: This revision was merged to the branch mainline in revision 3350.
  • Revision ID: robertc@robertcollins.net-20080408033943-ihbgs5wyqnh61bit
 * ``VersionedFile.get_sha1`` is deprecated, please use
   ``VersionedFile.get_sha1s``. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
777
777
        """See VersionedFile.get_graph_with_ghosts()."""
778
778
        return self.get_parent_map(self.versions())
779
779
 
780
 
    def get_sha1(self, version_id):
781
 
        return self.get_sha1s([version_id])[0]
782
 
 
783
780
    def get_sha1s(self, version_ids):
784
 
        """See VersionedFile.get_sha1()."""
 
781
        """See VersionedFile.get_sha1s()."""
785
782
        record_map = self._get_record_map(version_ids)
786
783
        # record entry 2 is the 'digest'.
787
784
        return [record_map[v][2] for v in version_ids]
834
831
                # Also check the SHA-1 of the fulltext this content will
835
832
                # produce.
836
833
                raw_data = reader_callable(length)
837
 
                my_fulltext_sha1 = self.get_sha1(version_id)
 
834
                my_fulltext_sha1 = self.get_sha1s([version_id])[0]
838
835
                df, rec = self._data._parse_record_header(version_id, raw_data)
839
836
                stream_fulltext_sha1 = rec[3]
840
837
                if my_fulltext_sha1 != stream_fulltext_sha1: