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

  • Committer: Jelmer Vernooij
  • Date: 2020-07-18 23:14:00 UTC
  • mfrom: (7490.40.62 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200718231400-jaes9qltn8oi8xss
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    )
46
46
 
47
47
 
 
48
class IllegalMergeDirectivePayload(errors.BzrError):
 
49
    """A merge directive contained something other than a patch or bundle"""
 
50
 
 
51
    _fmt = "Bad merge directive payload %(start)r"
 
52
 
 
53
    def __init__(self, start):
 
54
        errors.BzrError(self)
 
55
        self.start = start
 
56
 
 
57
 
48
58
class MergeRequestBodyParams(object):
49
59
    """Parameter object for the merge_request_body hook."""
50
60
 
542
552
                if start.startswith(b'# Begin bundle'):
543
553
                    bundle = b''.join(line_iter)
544
554
                else:
545
 
                    raise errors.IllegalMergeDirectivePayload(start)
 
555
                    raise IllegalMergeDirectivePayload(start)
546
556
        time, timezone = timestamp.parse_patch_date(stanza.get('timestamp'))
547
557
        kwargs = {}
548
558
        for key in ('revision_id', 'testament_sha1', 'target_branch',