/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-06-16 02:23:42 UTC
  • mfrom: (7340 work)
  • mto: This revision was merged to the branch mainline in revision 7350.
  • Revision ID: jelmer@jelmer.uk-20190616022342-ihxzayq04x5culzd
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
                 urlutils.join(url, "profile/personal_access_tokens"))
310
310
            private_token = ui.ui_factory.get_password(u'Private token')
311
311
        if not no_check:
312
 
            from gitlab import Gitlab
313
 
            gl = Gitlab(url=url, private_token=private_token)
314
 
            gl.auth()
 
312
            from breezy.transport import get_transport
 
313
            from .gitlabs import GitLab
 
314
            GitLab(get_transport(url), private_token=private_token)
315
315
        store_gitlab_token(name=name, url=url, private_token=private_token)
316
316
 
317
317
 
323
323
    hidden = True
324
324
 
325
325
    takes_options = [
 
326
        'verbose',
326
327
        RegistryOption.from_kwargs(
327
328
            'status',
328
329
            title='Proposal Status',
334
335
            merged='Merged merge proposals',
335
336
            closed='Closed merge proposals')]
336
337
 
337
 
    def run(self, status='open'):
 
338
    def run(self, status='open', verbose=False):
338
339
        from .propose import hosters
339
340
        for name, hoster_cls in hosters.items():
340
341
            for instance in hoster_cls.iter_instances():
341
342
                for mp in instance.iter_my_proposals(status=status):
342
343
                    self.outf.write('%s\n' % mp.url)
 
344
                    if verbose:
 
345
                        self.outf.write(
 
346
                            '(Merging %s into %s)\n' %
 
347
                            (mp.get_source_branch_url(),
 
348
                             mp.get_target_branch_url()))
 
349
                        self.outf.writelines(
 
350
                            ['\t%s\n' % l
 
351
                             for l in mp.get_description().splitlines()])
 
352
                        self.outf.write('\n')
343
353
 
344
354
 
345
355
class cmd_land_merge_proposal(Command):