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

  • Committer: Jelmer Vernooij
  • Date: 2018-07-13 00:24:33 UTC
  • mfrom: (7037 work)
  • mto: This revision was merged to the branch mainline in revision 7039.
  • Revision ID: jelmer@jelmer.uk-20180713002433-dr601ols49ge07fr
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    errors,
24
24
    ui,
25
25
    )
26
 
from breezy.bundle.serializer import (BundleSerializer,
27
 
                                      _get_bundle_header,
28
 
                                     )
 
26
from breezy.bundle.serializer import (
 
27
    BundleSerializer,
 
28
    _get_bundle_header,
 
29
    )
29
30
from breezy.bundle.serializer import binary_diff
30
 
from breezy.bundle.bundle_data import (RevisionInfo, BundleInfo)
 
31
from breezy.bundle.bundle_data import (
 
32
    RevisionInfo,
 
33
    BundleInfo,
 
34
    )
31
35
from breezy.diff import internal_diff
32
36
from breezy.revision import NULL_REVISION
33
37
from breezy.sixish import text_type
91
95
 
92
96
 
93
97
class BundleSerializerV08(BundleSerializer):
 
98
 
94
99
    def read(self, f):
95
100
        """Read the rest of the bundles from the supplied file.
96
101
 
477
482
        values = []
478
483
        start = b'#' + (b' '*indent)
479
484
 
480
 
        if self._next_line is None or self._next_line[:len(start)] != start:
 
485
        if self._next_line is None or not self._next_line.startswith(start):
481
486
            return values
482
487
 
483
488
        for line in self._next():
484
489
            values.append(line[len(start):-1].decode('utf-8'))
485
 
            if self._next_line is None or self._next_line[:len(start)] != start:
 
490
            if self._next_line is None or not self._next_line.startswith(start):
486
491
                break
487
492
        return values
488
493