~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Robert Collins
  • Date: 2007-09-21 01:36:48 UTC
  • mfrom: (2841 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20070921013648-i9w180g6ea73w9mf
Merge more bzr.dev goodness.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1014
1014
            text_map[version_id] = text
1015
1015
        return text_map, final_content
1016
1016
 
 
1017
    @staticmethod
 
1018
    def _apply_delta(lines, delta):
 
1019
        """Apply delta to lines."""
 
1020
        lines = list(lines)
 
1021
        offset = 0
 
1022
        for start, end, count, delta_lines in delta:
 
1023
            lines[offset+start:offset+end] = delta_lines
 
1024
            offset = offset + (start - end) + count
 
1025
        return lines
 
1026
 
1017
1027
    def iter_lines_added_or_present_in_versions(self, version_ids=None, 
1018
1028
                                                pb=None):
1019
1029
        """See VersionedFile.iter_lines_added_or_present_in_versions()."""