/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/git/commands.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-06 22:22:47 UTC
  • mfrom: (7143.22.4 progressbar-context)
  • Revision ID: breezy.the.bot@gmail.com-20190606222247-muw4nwibuoh9b30u
Use contexts for progress bars where possible.

Merged from https://code.launchpad.net/~jelmer/brz/progressbar-context/+merge/358460

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
        interrepo = InterRepository.get(source_repo, target_repo)
131
131
        mapping = source_repo.get_mapping()
132
132
        refs = interrepo.fetch()
133
 
        pb = ui.ui_factory.nested_progress_bar()
134
 
        try:
 
133
        with ui.ui_factory.nested_progress_bar() as pb:
135
134
            for i, (name, sha) in enumerate(viewitems(refs)):
136
135
                try:
137
136
                    branch_name = ref_to_branch_name(name)
159
158
                        source_branch.base,
160
159
                        {"branch": urlutils.escape(branch_name)})
161
160
                    head_branch.set_parent(url)
162
 
        finally:
163
 
            pb.finished()
164
161
        trace.note(gettext(
165
162
            "Use 'bzr checkout' to create a working tree in "
166
163
            "the newly created branches."))