~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_knit_load_data_c.pyx

  • Committer: John Arbash Meinel
  • Date: 2007-07-05 19:39:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2614.
  • Revision ID: john@arbash-meinel.com-20070705193928-xtm8nh4ucc8qosdn
Add direct tests of how we handle incomplete/'broken' lines

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
            # Process until the end of the file
261
261
            last = self.end_str - 1
262
262
            self.cur_str = self.end_str
263
 
            line = PyString_FromStringAndSize(start, last - start)
264
 
            ending = PyString_FromStringAndSize(last, 1)
265
263
        else:
266
264
            # The last character is right before the '\n'
267
265
            # And the next string is right after it
268
 
            line = PyString_FromStringAndSize(start, last - start)
269
266
            self.cur_str = last + 1
270
267
            last = last - 1
271
 
            ending = PyString_FromStringAndSize(last, 3)
272
268
 
273
269
        if last <= start or last[0] != c':':
274
270
            # Incomplete record