/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: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    Option,
34
34
    RegistryOption,
35
35
    )
36
 
from ..sixish import (
37
 
    text_type,
38
 
    viewitems,
39
 
    )
40
36
 
41
37
 
42
38
class cmd_git_import(Command):
141
137
        mapping = source_repo.get_mapping()
142
138
        result = interrepo.fetch()
143
139
        with ui.ui_factory.nested_progress_bar() as pb:
144
 
            for i, (name, sha) in enumerate(viewitems(result.refs)):
 
140
            for i, (name, sha) in enumerate(result.refs.items()):
145
141
                try:
146
142
                    branch_name = ref_to_branch_name(name)
147
143
                except ValueError:
186
182
    takes_args = ["sha1?"]
187
183
    takes_options = [Option('directory',
188
184
                            short_name='d',
189
 
                            help='Location of repository.', type=text_type),
 
185
                            help='Location of repository.', type=str),
190
186
                     Option('pretty', help='Pretty-print objects.')]
191
187
    encoding_type = 'exact'
192
188
 
247
243
        object_store = get_object_store(repo)
248
244
        with object_store.lock_read():
249
245
            refs = get_refs_container(controldir, object_store)
250
 
            for k, v in sorted(viewitems(refs.as_dict())):
 
246
            for k, v in sorted(refs.as_dict().items()):
251
247
                self.outf.write("%s -> %s\n" %
252
248
                                (k.decode('utf-8'), v.decode('utf-8')))
253
249
 
304
300
 
305
301
    takes_options = [Option('directory',
306
302
                            short_name='d',
307
 
                            help='Location of repository.', type=text_type)]
 
303
                            help='Location of repository.', type=str)]
308
304
    takes_args = ['target', 'package']
309
305
 
310
306
    def run(self, target, package, directory='.'):