/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: Gustav Hartvigsson
  • Date: 2021-01-11 20:19:38 UTC
  • mfrom: (7526.3.2 work)
  • Revision ID: gustav.hartvigsson@gmail.com-20210111201938-omr9wjz3qdgyxe8k
MergedĀ lp:brz

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',