/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/knit.py

  • Committer: Martin Pool
  • Date: 2008-06-04 07:47:17 UTC
  • mfrom: (3460.2.1 mpdiff)
  • mto: This revision was merged to the branch mainline in revision 3475.
  • Revision ID: mbp@sourcefrog.net-20080604074717-r3quvpdo7d0d1zrh
merge fix from robert for Knit.add_lines with matching blocks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1185
1185
                for i, j, n in seq.get_matching_blocks():
1186
1186
                    if n == 0:
1187
1187
                        continue
1188
 
                    # this appears to copy (origin, text) pairs across to the
1189
 
                    # new content for any line that matches the last-checked
 
1188
                    # this copies (origin, text) pairs across to the new
 
1189
                    # content for any line that matches the last-checked
1190
1190
                    # parent.
1191
1191
                    content._lines[j:j+n] = merge_content._lines[i:i+n]
1192
1192
        if delta:
1331
1331
            delta = self._check_should_delta(present_parents)
1332
1332
 
1333
1333
        content = self.factory.make(lines, version_id)
 
1334
        if 'no-eol' in options:
 
1335
            # Hint to the content object that its text() call should strip the
 
1336
            # EOL.
 
1337
            content._should_strip_eol = True
1334
1338
        if delta or (self.factory.annotated and len(present_parents) > 0):
1335
1339
            # Merge annotations from parent texts if needed.
1336
1340
            delta_hunks = self._merge_annotations(content, present_parents,
2692
2696
                                     digest)],
2693
2697
            dense_lines or lines,
2694
2698
            ["end %s\n" % version_id]))
 
2699
        if lines and lines[-1][-1] != '\n':
 
2700
            raise ValueError('corrupt lines value %r' % lines)
2695
2701
        compressed_bytes = bytes_to_gzip(bytes)
2696
2702
        return len(compressed_bytes), compressed_bytes
2697
2703