/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/bundle/serializer/v08.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-22 20:01:47 UTC
  • mfrom: (1793.3.4 bundle-fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20060622200147-08093baa0cf46599
(jam) fix #49182, ignore trailing whitespace in bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
329
329
    def _read(self):
330
330
        self._next().next()
331
331
        while self._next_line is not None:
332
 
            self._read_revision_header()
 
332
            if not self._read_revision_header():
 
333
                break
333
334
            if self._next_line is None:
334
335
                break
335
336
            self._read_patches()
359
360
        yield last
360
361
 
361
362
    def _read_revision_header(self):
 
363
        found_something = False
362
364
        self.info.revisions.append(RevisionInfo(None))
363
365
        for line in self._next():
364
366
            # The bzr header is terminated with a blank line
365
367
            # which does not start with '#'
366
368
            if line is None or line == '\n':
367
369
                break
 
370
            found_something = True
368
371
            self._handle_next(line)
 
372
        if not found_something:
 
373
            # Nothing was there, so remove the added revision
 
374
            self.info.revisions.pop()
 
375
        return found_something
369
376
 
370
377
    def _read_next_entry(self, line, indent=1):
371
378
        """Read in a key-value pair