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

  • Committer: Jelmer Vernooij
  • Date: 2019-01-03 00:18:35 UTC
  • mfrom: (0.431.66 trunk)
  • mto: This revision was merged to the branch mainline in revision 7239.
  • Revision ID: jelmer@jelmer.uk-20190103001835-j9hdqbz70tp2ks84
Merge support for merge proposal status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
 
304
304
 
305
305
class cmd_my_merge_proposals(Command):
306
 
    __doc__ = """List my merge proposals.
 
306
    __doc__ = """List all merge proposals owned by the logged-in user.
307
307
 
308
308
    """
309
309
 
310
 
    def run(self):
 
310
    takes_options = [
 
311
        RegistryOption.from_kwargs(
 
312
            'status',
 
313
            title='Proposal Status',
 
314
            help='Only include proposals with specified status.',
 
315
            value_switches=True,
 
316
            enum_switch=True,
 
317
            all='All merge proposals',
 
318
            open='Open merge proposals',
 
319
            merged='Merged merge proposals',
 
320
            closed='Closed merge proposals')]
 
321
 
 
322
    def run(self, status='open'):
311
323
        from .propose import hosters
312
324
        for name, hoster_cls in hosters.items():
313
325
            for instance in hoster_cls.iter_instances():
314
 
                for mp in instance.iter_my_proposals():
 
326
                for mp in instance.iter_my_proposals(status=status):
315
327
                    self.outf.write('%s\n' % mp.url)