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

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2017-06-11 01:56:34 UTC
  • mfrom: (6684.1.5 py3_bootstrap2)
  • Revision ID: breezy.the.bot@gmail.com-20170611015634-9eeh86thh073hcko
More progress towards Python 3 support

Merged from https://code.launchpad.net/~gz/brz/py3_bootstrap2/+merge/325452

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    )
79
79
 
80
80
 
81
 
MERGE_MODIFIED_HEADER_1 = "BZR merge-modified list format 1"
 
81
MERGE_MODIFIED_HEADER_1 = b"BZR merge-modified list format 1"
82
82
# TODO: Modifying the conflict objects or their type is currently nearly
83
83
# impossible as there is no clear relationship between the working tree format
84
84
# and the conflict list file format.
85
 
CONFLICT_HEADER_1 = "BZR conflict list format 1"
 
85
CONFLICT_HEADER_1 = b"BZR conflict list format 1"
86
86
 
87
87
 
88
88
class InventoryWorkingTree(WorkingTree,MutableInventoryTree):
382
382
            return _mod_conflicts.ConflictList()
383
383
        try:
384
384
            try:
385
 
                if next(confile) != CONFLICT_HEADER_1 + '\n':
 
385
                if next(confile) != CONFLICT_HEADER_1 + b'\n':
386
386
                    raise errors.ConflictFormatError()
387
387
            except StopIteration:
388
388
                raise errors.ConflictFormatError()
650
650
 
651
651
    def _put_rio(self, filename, stanzas, header):
652
652
        self._must_be_locked()
653
 
        my_file = _mod_rio.rio_file(stanzas, header.encode('ascii'))
 
653
        my_file = _mod_rio.rio_file(stanzas, header)
654
654
        self._transport.put_file(filename, my_file,
655
655
            mode=self.controldir._get_file_mode())
656
656
 
680
680
        try:
681
681
            merge_hashes = {}
682
682
            try:
683
 
                if next(hashfile) != MERGE_MODIFIED_HEADER_1 + '\n':
 
683
                if next(hashfile) != MERGE_MODIFIED_HEADER_1 + b'\n':
684
684
                    raise errors.MergeModifiedFormatError()
685
685
            except StopIteration:
686
686
                raise errors.MergeModifiedFormatError()