/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/plugins/propose/gitlabs.py

  • Committer: Jelmer Vernooij
  • Date: 2019-01-03 02:35:46 UTC
  • mfrom: (0.431.67 trunk)
  • mto: This revision was merged to the branch mainline in revision 7239.
  • Revision ID: jelmer@jelmer.uk-20190103023546-pryb5dotaw5ecbbt
Merge lp:brz-propose.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    MergeProposal,
34
34
    MergeProposalBuilder,
35
35
    MergeProposalExists,
36
 
    NoMergeProposal,
37
36
    NoSuchProject,
38
37
    PrerequisiteBranchUnsupported,
39
38
    UnsupportedHoster,
249
248
    def get_proposer(self, source_branch, target_branch):
250
249
        return GitlabMergeProposalBuilder(self.gl, source_branch, target_branch)
251
250
 
252
 
    def get_proposal(self, source_branch, target_branch):
 
251
    def iter_proposals(self, source_branch, target_branch):
253
252
        import gitlab
254
253
        (source_host, source_project_name, source_branch_name) = (
255
254
            parse_gitlab_url(source_branch))
267
266
                        mr.target_project_id != target_project.id or
268
267
                        mr.target_branch != target_branch_name):
269
268
                    continue
270
 
                return GitLabMergeProposal(mr)
 
269
                yield GitLabMergeProposal(mr)
271
270
        except gitlab.GitlabListError as e:
272
271
            if e.response_code == 403:
273
272
                raise errors.PermissionDenied(e.error_message)
274
 
        raise NoMergeProposal()
275
273
 
276
274
    def hosts(self, branch):
277
275
        try: