~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_groupcompress_py.py

Move more information down into EquivalenceTable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
    def __init__(self, lines):
32
32
        self.lines = lines
 
33
        self.line_offsets = []
 
34
        self.endpoint = sum(map(len, lines))
33
35
        self._right_lines = None
34
36
        # For each line in 'left' give the offset to the other lines which
35
37
        # match it.
158
160
        """
159
161
        self._update_matching_lines(lines, index)
160
162
        self.lines.extend(lines)
 
163
        endpoint = self.endpoint
 
164
        for line in lines:
 
165
            endpoint += len(line)
 
166
            self.line_offsets.append(endpoint)
 
167
        assert len(self.line_offsets) == len(self.lines)
 
168
        self.endpoint = endpoint
161
169
 
162
170
    def set_right_lines(self, lines):
163
171
        """Set the lines we will be matching against."""