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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-11 21:04:12 UTC
  • mfrom: (7031.1.4 python3-diff)
  • Revision ID: breezy.the.bot@gmail.com-20180711210412-l80sfib91f3uhwc0
Port diff and merge_directive to Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-diff/+merge/349216

Show diffs side-by-side

added added

removed removed

Lines of Context:
351
351
            if encoding == 'base64':
352
352
                patch = base64.decodestring(''.join(lines))
353
353
            elif encoding is None:
354
 
                patch =  ''.join(lines)
 
354
                patch =  b''.join(lines)
355
355
            else:
356
356
                raise ValueError(encoding)
357
357
            bundle_tree.note_patch(path, patch)
642
642
                raise AssertionError("None: %s" % file_id)
643
643
            return patch_original
644
644
 
645
 
        if file_patch.startswith('\\'):
 
645
        if file_patch.startswith(b'\\'):
646
646
            raise ValueError(
647
647
                'Malformed patch for %s, %r' % (file_id, file_patch))
648
648
        return patched_file(file_patch, patch_original)