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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-02-14 04:35:05 UTC
  • mfrom: (7268.8.2 credentials-error)
  • Revision ID: breezy.the.bot@gmail.com-20190214043505-rhoijzdtilj8pcq5
Raise a clearer error when not logged into e.g. GitHub.

Merged from https://code.launchpad.net/~jelmer/brz/credentials-error/+merge/362950

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        self.hoster = hoster
84
84
 
85
85
 
 
86
class HosterLoginRequired(errors.BzrError):
 
87
    """Action requires hoster login credentials."""
 
88
 
 
89
    _fmt = "Action requires credentials for hosting site %(hoster)r."""
 
90
 
 
91
    def __init__(self, hoster):
 
92
        errors.BzrError.__init__(self)
 
93
        self.hoster = hoster
 
94
 
 
95
 
86
96
class MergeProposal(object):
87
97
    """A merge proposal.
88
98
 
175
185
        :param base_branch: branch to derive the new branch from
176
186
        :param new_branch: branch to publish
177
187
        :return: resulting branch, public URL
 
188
        :raise HosterLoginRequired: Action requires a hoster login, but none is
 
189
            known.
178
190
        """
179
191
        raise NotImplementedError(self.publish)
180
192
 
225
237
        :param status: Only yield proposals with this status
226
238
            (one of: 'open', 'closed', 'merged', 'all')
227
239
        :return: Iterator over MergeProposal objects
 
240
        :raise HosterLoginRequired: Action requires a hoster login, but none is
 
241
            known.
228
242
        """
229
243
        raise NotImplementedError(self.iter_my_proposals)
230
244